[Checkins] SVN: transaction/trunk/transaction/tests/test_weakset.py
Fix test that incorrectly relied on the order of a list that
was generated
Christian Theune
ct at gocept.com
Sun Jun 8 04:32:51 EDT 2008
Log message for revision 87238:
Fix test that incorrectly relied on the order of a list that was generated
from a dict.
Changed:
U transaction/trunk/transaction/tests/test_weakset.py
-=-
Modified: transaction/trunk/transaction/tests/test_weakset.py
===================================================================
--- transaction/trunk/transaction/tests/test_weakset.py 2008-06-07 23:16:44 UTC (rev 87237)
+++ transaction/trunk/transaction/tests/test_weakset.py 2008-06-08 08:32:50 UTC (rev 87238)
@@ -55,7 +55,9 @@
w.add(dummy3)
del dummy3
L = [x() for x in w.as_weakref_list()]
- self.assertEqual(L, [dummy, dummy2])
+ # L is a list, but it does not have a guaranteed order.
+ self.assert_(list, type(L))
+ self.assertEqual(set(L), set([dummy, dummy2]))
def test_map(self):
w = WeakSet()
More information about the Checkins
mailing list