[Zodb-checkins] CVS: StandaloneZODB - test.py:1.3

Jeremy Hylton jeremy@zope.com
Tue, 14 Aug 2001 18:58:53 -0400


Update of /cvs-repository/StandaloneZODB
In directory cvs.zope.org:/tmp/cvs-serv24547

Modified Files:
	test.py 
Log Message:
attempt to get this script to run on Windows


=== StandaloneZODB/test.py 1.2 => 1.3 ===
 from distutils.util import get_platform
 
+DOTSLASH = "." + os.sep
+
 # setup list of directories to put on the path
 
 def setup_path():
@@ -21,12 +23,12 @@
         self.files = []
 
     def visit(self, rx, dir, files):
-        if dir.startswith("./build"):
+        if dir.startswith(DOTSLASH + "build"):
             return
         if not dir.endswith("tests"):
             return
         # XXX special case bsddb3Storage
-        if dir.startswith("./bsddb3Storage/bsddb3Storage"):
+        if dir.startswith(DOTSLASH + "bsddb3Storage/bsddb3Storage"):
             dir = "./" + dir[16:]
         for file in files:
             if file.startswith("test") and file.endswith(".py"):
@@ -59,7 +61,7 @@
 
     runner = unittest.TextTestRunner(verbosity=VERBOSE)
     for file in files:
-        assert file.startswith('./')
+        assert file.startswith(DOTSLASH)
         assert file.endswith('.py')
         modname = file[2:-3]
         modname = modname.replace(os.sep, '.')