Fix NotQuery assertion by using sets, not lists

* Fix issue with an assertion that was order-sensitive and caused a problem on
some tox runs.
This commit is contained in:
Diego Moreda 2015-11-18 17:40:47 +01:00
parent e457479558
commit e69b3b3c5d

View file

@ -807,8 +807,8 @@ class NotQueryTest(DummyDataTestCase):
# round trip
not_not_q = dbcore.query.NotQuery(not_q)
self.assertEqual([i.title for i in self.lib.items(q)],
[i.title for i in self.lib.items(not_not_q)])
self.assertEqual(set([i.title for i in self.lib.items(q)]),
set([i.title for i in self.lib.items(not_not_q)]))
def test_type_and(self):
# not(a and b) <-> not(a) or not(b)