]> granicus.if.org Git - python/commitdiff
When calling tarname with an argument (and thus not use testtar.tar) return a
authorBrett Cannon <bcannon@gmail.com>
Thu, 12 Jun 2003 19:16:58 +0000 (19:16 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 12 Jun 2003 19:16:58 +0000 (19:16 +0000)
path for the file in the temp directory for the platform.

Lib/test/test_tarfile.py

index 682d0d8981184ae10a26bf609c071c436a341081..9d40ace8c3b301eeedd4135134fb4c79bdc8615f 100644 (file)
@@ -30,7 +30,7 @@ membercount = 10
 def tarname(comp=""):
     if not comp:
         return testtar
-    return "%s%s%s" % (testtar, os.extsep, comp)
+    return os.path.join(tempdir, "%s%s%s" % (testtar, os.extsep, comp))
 
 def dirname():
     if not os.path.exists(tempdir):