mirror of https://github.com/python/cpython
Issue #7295: Do not use a hardcoded file name in test_tarfile.
This commit is contained in:
parent
fdd53545a1
commit
310c9fec1a
|
@ -27,11 +27,8 @@ except ImportError:
|
|||
def md5sum(data):
|
||||
return md5(data).hexdigest()
|
||||
|
||||
def path(path):
|
||||
return test_support.findfile(path)
|
||||
|
||||
TEMPDIR = os.path.join(tempfile.gettempdir(), "test_tarfile_tmp")
|
||||
tarname = path("testtar.tar")
|
||||
TEMPDIR = os.path.abspath(test_support.TESTFN)
|
||||
tarname = test_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")
|
||||
|
@ -1263,8 +1260,7 @@ class Bz2PartialReadTest(unittest.TestCase):
|
|||
|
||||
|
||||
def test_main():
|
||||
if not os.path.exists(TEMPDIR):
|
||||
os.mkdir(TEMPDIR)
|
||||
os.makedirs(TEMPDIR)
|
||||
|
||||
tests = [
|
||||
UstarReadTest,
|
||||
|
|
Loading…
Reference in New Issue