[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/stateful/tests - test_contentworkflow.py:1.4

Philipp von Weitershausen philikon@philikon.de
Sun Aug 3 02:33:16 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/workflow/stateful/tests
In directory cvs.zope.org:/tmp/cvs-serv17263/src/zope/app/workflow/stateful/tests

Modified Files:
	test_contentworkflow.py 
Log Message:
The ContentWorkflowsManager returns interfaces not in any particular order
since they come out of dict.keys(). Thus, accept the two interfaces in the
test in either order.

This is situation is really tricky. For the original committer of the test,
it probably worked 100% of the time, while for others (like me), it always
returned a failure (I wonder what the cause is -- big endian vs. small
endian?). What can we do to avoid situations like these?


=== Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py:1.3	Tue Jul 29 20:00:28 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py	Sat Aug  2 21:33:10 2003
@@ -150,9 +150,9 @@
 
     def test_getInterfacesForProcessName(self):
         manager = self.getManager()
-        self.assertEqual(
-            manager.getInterfacesForProcessName(u'default'),
-            (IFace2, IFace1))
+        ifaces = manager.getInterfacesForProcessName(u'default')
+        self.assert_(ifaces == (IFace2, IFace1) or
+                     ifaces == (IFace1, IFace2))
         self.assertEqual(
             manager.getInterfacesForProcessName(u'foo'),
             ())





More information about the Zope3-Checkins mailing list