[Zope-Checkins] CVS: ZODB3/ZEO/tests - testZEO.py:1.54.2.9

Tim Peters tim.one at comcast.net
Tue Aug 5 14:29:11 EDT 2003


Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv10275/ZEO/tests

Modified Files:
      Tag: ZODB3-3_1-branch
	testZEO.py 
Log Message:
93 level 1 Berkeley tests were failing on Windows.  This repairs them.
I hope it doesn't harm Linux, and don't see how it could, but have not
confirmed it.

The level 1 tests all pass on Windows now.  The level 2 tests never did,
and still don't (not before ZODB4; the connection tests in particular
are virtually certain to hang and/or time out on Windows, and Berkeley or
not).

BDBTests.getStorage():  Since we have no way to pass None on the cmdline,
and the storage name defaults to 'full' anyway, just accept the default
argument values instead of trying to force them.

BDBTests.delStorage():  Don't try to remove the Berkeley temp directory
when it doesn't exist.


=== ZODB3/ZEO/tests/testZEO.py 1.54.2.8 => 1.54.2.9 ===
--- ZODB3/ZEO/tests/testZEO.py:1.54.2.8	Mon Aug  4 18:14:00 2003
+++ ZODB3/ZEO/tests/testZEO.py	Tue Aug  5 13:29:06 2003
@@ -245,11 +245,17 @@
 class BDBTests(os.name == "nt" and WindowsTests or UnixTests):
     def getStorage(self):
         self.__bdbdir = tempfile.mktemp()
-        return 'ZEO.tests.testZEO.BDBFactory', (
-            self.__bdbdir, None, None, 'full')
+        # The arguments to BDBFactory are
+        #     path, create=None, readonly=None, storage='full'
+        # We want the defaults.
+        # CAUTION:  Trying to specify the defaults explicitly here creates
+        # headaches, because the Window ZEO spawner has no way to pass
+        # None correctly via a cmdline.
+        return 'ZEO.tests.testZEO.BDBFactory', (self.__bdbdir,)
 
     def delStorage(self):
-        shutil.rmtree(self.__bdbdir)
+        if os.path.exists(self.__bdbdir):
+            shutil.rmtree(self.__bdbdir)
 
 
 if os.name == "posix":




More information about the Zope-Checkins mailing list