[Zope3-checkins] SVN: Zope3/trunk/src/zope/deprecation/tests.py make zope.deprecation tests pass on Windows by translating path seperator

Benji York benji at zope.com
Sun Apr 30 10:43:31 EDT 2006


Log message for revision 67765:
  make zope.deprecation tests pass on Windows by translating path seperator
  in doctests
  

Changed:
  U   Zope3/trunk/src/zope/deprecation/tests.py

-=-
Modified: Zope3/trunk/src/zope/deprecation/tests.py
===================================================================
--- Zope3/trunk/src/zope/deprecation/tests.py	2006-04-30 14:07:11 UTC (rev 67764)
+++ Zope3/trunk/src/zope/deprecation/tests.py	2006-04-30 14:43:30 UTC (rev 67765)
@@ -16,13 +16,15 @@
 $Id$
 """
 
+from zope.testing import doctest
+from zope.testing import renormalizing
 import os
+import re
 import shutil
 import sys
 import tempfile
 import unittest
 import warnings
-from zope.testing import doctest
 import zope.deprecation
 
 # Used in doctests
@@ -97,10 +99,16 @@
                                 '_DeprecationProxy__deprecated')['demo4']
 
 def test_suite():
+    checker = renormalizing.RENormalizing([
+        (re.compile('\\\\'), '/'),   # convert Windows paths to Unix paths
+        ])
+
     return unittest.TestSuite((
         doctest.DocFileSuite('README.txt',
                              setUp=setUp, tearDown=tearDown,
-                             optionflags=doctest.ELLIPSIS),
+                             optionflags=doctest.ELLIPSIS,
+                             checker=checker,
+                             ),
         ))
 
 if __name__ == "__main__":



More information about the Zope3-Checkins mailing list