From e69b3b3c5d38a36868fdafaa2f540f65e1227c71 Mon Sep 17 00:00:00 2001 From: Diego Moreda Date: Wed, 18 Nov 2015 17:40:47 +0100 Subject: [PATCH] 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. --- test/test_query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_query.py b/test/test_query.py index 64328233f..5720c65cf 100644 --- a/test/test_query.py +++ b/test/test_query.py @@ -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)