[Zope3-checkins] SVN: Zope3/trunk/src/zope/configuration/xmlconfig.py Modified doctest so that it passes on win2000 as well as on linux.

Steve Alexander steve at z3u.com
Sat Aug 7 02:55:02 EDT 2004


Log message for revision 26949:
  Modified doctest so that it passes on win2000 as well as on linux.
  


Changed:
  U   Zope3/trunk/src/zope/configuration/xmlconfig.py


-=-
Modified: Zope3/trunk/src/zope/configuration/xmlconfig.py
===================================================================
--- Zope3/trunk/src/zope/configuration/xmlconfig.py	2004-08-06 22:33:20 UTC (rev 26948)
+++ Zope3/trunk/src/zope/configuration/xmlconfig.py	2004-08-07 06:55:01 UTC (rev 26949)
@@ -276,12 +276,18 @@
     >>> f.name[-11:]
     'foo.zcml.in'
 
-    Make sure other IOErrors are re-raised:
+    Make sure other IOErrors are re-raised.  We need to do this in a
+    try-except block because different errors are raised on Windows and
+    on Linux.
 
-    >>> f = openInOrPlain('.')
-    Traceback (most recent call last):
+    >>> try:
+    ...     f = openInOrPlain('.')
+    ... except IOError:
+    ...     print "passed"
+    ... else:
+    ...     print "failed"
     ...
-    IOError: [Errno 21] Is a directory
+    passed
 
     """
     try:



More information about the Zope3-Checkins mailing list