diff options
-rw-r--r-- | Lib/test/test_tarfile.py | 10 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index e916879..551d098 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -26,11 +26,8 @@ except ImportError: def md5sum(data): return md5(data).hexdigest() -def path(path): - return support.findfile(path) - -TEMPDIR = os.path.join(tempfile.gettempdir(), "test_tarfile_tmp") -tarname = path("testtar.tar") +TEMPDIR = os.path.abspath(support.TESTFN) +tarname = support.findfile("testtar.tar") gzipname = os.path.join(TEMPDIR, "testtar.tar.gz") bz2name = os.path.join(TEMPDIR, "testtar.tar.bz2") tmpname = os.path.join(TEMPDIR, "tmp.tar") @@ -1244,8 +1241,7 @@ class Bz2PartialReadTest(unittest.TestCase): def test_main(): - if not os.path.exists(TEMPDIR): - os.mkdir(TEMPDIR) + os.makedirs(TEMPDIR) tests = [ UstarReadTest, @@ -373,6 +373,8 @@ Documentation Tests ----- +- Issue #7295: Do not use a hardcoded file name in test_tarfile. + - Issue #7270: Add some dedicated unit tests for multi-thread synchronization primitives such as Lock, RLock, Condition, Event and Semaphore. |