[Zope-CVS] CVS: Products/AdaptableStorage/tests - testZope2FS.py:1.22

Shane Hathaway shane@zope.com
Sat, 1 Mar 2003 15:39:32 -0500


Update of /cvs-repository/Products/AdaptableStorage/tests
In directory cvs.zope.org:/tmp/cvs-serv28424/tests

Modified Files:
	testZope2FS.py 
Log Message:
Reused the same temporary directory for all tests


=== Products/AdaptableStorage/tests/testZope2FS.py 1.21 => 1.22 ===
--- Products/AdaptableStorage/tests/testZope2FS.py:1.21	Mon Feb 10 21:30:15 2003
+++ Products/AdaptableStorage/tests/testZope2FS.py	Sat Mar  1 15:39:26 2003
@@ -40,6 +40,8 @@
 except NameError:
     __file__ = os.path.abspath(sys.argv[0])
 
+tmpdir = mktemp()
+
 
 class Zope2FSTests (unittest.TestCase, Zope2TestBase):
 
@@ -47,10 +49,10 @@
         return createMapper(path)
 
     def setUp(self):
-        path = mktemp()
-        os.mkdir(path)
-        self.path = path
-        dm, conns = self._createMapper(path)
+        if not os.path.exists(tmpdir):
+            os.mkdir(tmpdir)
+        self.path = tmpdir
+        dm, conns = self._createMapper(tmpdir)
         self.dm = dm
         assert len(conns) == 1
         self.conn = conns[0]