]> granicus.if.org Git - python/commitdiff
make this test work when run repeatedly.
authorMichael W. Hudson <mwh@python.net>
Tue, 3 Aug 2004 11:08:32 +0000 (11:08 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 3 Aug 2004 11:08:32 +0000 (11:08 +0000)
Lib/test/test_dircache.py

index 52014e2e9ef1a3c578e4d05dbfe0c6eb239558da..3f10872caf52fb89a89c3c0ce55527faf08589a2 100644 (file)
@@ -5,13 +5,12 @@
 
 import unittest
 from test.test_support import run_unittest, TESTFN
-import dircache, os, time, sys
+import dircache, os, time, sys, tempfile
 
 
 class DircacheTests(unittest.TestCase):
     def setUp(self):
-        self.tempdir = TESTFN+"_dir"
-        os.mkdir(self.tempdir)
+        self.tempdir = tempfile.mkdtemp()
 
     def tearDown(self):
         for fname in os.listdir(self.tempdir):