[Zope3-checkins] CVS: Zope3/src/zope/app/utilities/tests - test_interfaceutility.py:1.3

Philipp von Weitershausen philikon at philikon.de
Mon Aug 11 11:48:37 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/utilities/tests
In directory cvs.zope.org:/tmp/cvs-serv27184

Modified Files:
	test_interfaceutility.py 
Log Message:
Fix another test bug that only seems to appear on PPC (big endian?): order
of dictionary items or keys. Shame on you, dreamcatcher!

Please make sure in the future that, when a method returns something that
is not required to have an order, you won't check for an order.


=== Zope3/src/zope/app/utilities/tests/test_interfaceutility.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/utilities/tests/test_interfaceutility.py:1.2	Sat Aug  9 14:12:28 2003
+++ Zope3/src/zope/app/utilities/tests/test_interfaceutility.py	Mon Aug 11 10:48:32 2003
@@ -125,10 +125,17 @@
 
         iface_service = getService(self.rootFolder, Interfaces)
         self.assert_(iface_service != globalInterfaceService)
-        self.assertEqual(iface_service.items(),
-                         [('bob', foo), ('', bar)])
-        self.assertEqual(iface_service.items(base=IInterface),
-                         [('bob', foo), ('', bar)])
+
+        ifaces = iface_service.items()
+        self.assert_(len(ifaces), 2)
+        for pair in [('bob', foo), ('', bar)]:
+            self.assert_(pair in ifaces)
+
+        ifaces = iface_service.items(base=IInterface)
+        self.assert_(len(ifaces), 2)
+        for pair in [('bob', foo), ('', bar)]:
+            self.assert_(pair in ifaces)
+
         self.assertEqual(iface_service.items(base=Interface),
                          [])
 




More information about the Zope3-Checkins mailing list