File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 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
2323import 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 ):
You can’t perform that action at this time.
0 commit comments