[Zodb-checkins] CVS: ZODB3 - test.py:1.24.4.2

Jeremy Hylton jeremy at zope.com
Wed Sep 10 14:38:35 EDT 2003


Update of /cvs-repository/ZODB3
In directory cvs.zope.org:/tmp/cvs-serv23278

Modified Files:
      Tag: ZODB3-3_2-branch
	test.py 
Log Message:
Don't hardcode /tmp as the temp directory.


=== ZODB3/test.py 1.24.4.1 => 1.24.4.2 ===
--- ZODB3/test.py:1.24.4.1	Sat Sep  6 22:27:01 2003
+++ ZODB3/test.py	Wed Sep 10 13:38:35 2003
@@ -153,6 +153,8 @@
 
 PLAT_SPEC = "%s-%s" % (get_platform(), sys.version[0:3])
 
+default_temp_dir = tempfile.gettempdir()
+
 class ImmediateTestResult(unittest._TextTestResult):
 
     __super_init = unittest._TextTestResult.__init__
@@ -240,7 +242,7 @@
     def createTempDir(self, test):
         # Set test-specific temp directory
         name = test._TestCase__testMethodName # blast it
-        tempfile.tempdir = self.tempdir = os.path.join("/tmp", name)
+        tempfile.tempdir = self.tempdir = os.path.join(default_temp_dir, name)
         try:
             os.mkdir(self.tempdir)
         except OSError, err:




More information about the Zodb-checkins mailing list