Skip to content

Commit a1410d5

Browse files
author
Ralf Schlatterbeck
committed
fix for indexer-test:
Old version fails for me on Debian Etch with sqlite 2.8.17-2.
1 parent 94fdc89 commit a1410d5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/test_indexer.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21-
# $Id: test_indexer.py,v 1.11 2008-09-01 00:43:02 richard Exp $
21+
# $Id: test_indexer.py,v 1.12 2008-09-11 18:48:07 schlatterbeck Exp $
2222

2323
import os, unittest, shutil
2424

@@ -48,9 +48,14 @@ def setUp(self):
4848
self.dex.load_index()
4949

5050
def assertSeqEqual(self, s1, s2):
51-
# first argument is the db result we're testing, second is the desired result
52-
# some db results don't have iterable rows, so we have to work around that
53-
if [i for x,y in zip(s1, s2) for i,j in enumerate(y) if x[i] != j]:
51+
# first argument is the db result we're testing, second is the
52+
# desired result some db results don't have iterable rows, so we
53+
# have to work around that
54+
# Also work around some dbs not returning items in the expected
55+
# order. This would be *so* much easier with python2.4's sorted.
56+
s1 = list(s1)
57+
s1.sort()
58+
if s1 != s2:
5459
self.fail('contents of %r != %r'%(s1, s2))
5560

5661
def test_basics(self):

0 commit comments

Comments
 (0)