diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-23 19:39:35 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-23 19:39:35 (GMT) |
commit | ab58b5f90e60cb21752f5294538bc88d56cacfbe (patch) | |
tree | 15fd8e0f925333211b6a3979e5a370fea63cb06c /Lib/test/test_tarfile.py | |
parent | 95f5560b46b24a42468dda2f2ebcc3eba271c28d (diff) | |
download | cpython-ab58b5f90e60cb21752f5294538bc88d56cacfbe.zip cpython-ab58b5f90e60cb21752f5294538bc88d56cacfbe.tar.gz cpython-ab58b5f90e60cb21752f5294538bc88d56cacfbe.tar.bz2 |
Try harder to fix test_tarfile under Windows buildbots
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r-- | Lib/test/test_tarfile.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 6a985f8..a51b512 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -25,7 +25,7 @@ except ImportError: def md5sum(data): return md5(data).hexdigest() -TEMPDIR = os.path.abspath(support.TESTFN) +TEMPDIR = os.path.abspath(support.TESTFN) + "-tardir" tarname = support.findfile("testtar.tar") gzipname = os.path.join(TEMPDIR, "testtar.tar.gz") bz2name = os.path.join(TEMPDIR, "testtar.tar.bz2") @@ -538,6 +538,7 @@ class MemberReadTest(ReadTest): self._test_member(tarinfo, size=7011, chksum=md5_regtype) def test_find_pax_umlauts(self): + self.tar.close() self.tar = tarfile.open(self.tarname, mode=self.mode, encoding="iso8859-1") tarinfo = self.tar.getmember("pax/umlauts-\xc4\xd6\xdc\xe4\xf6\xfc\xdf") self._test_member(tarinfo, size=7011, chksum=md5_regtype) @@ -1228,6 +1229,7 @@ class UstarUnicodeTest(unittest.TestCase): self.assertEqual(t.gname, "\xe4\xf6\xfc") if self.format != tarfile.PAX_FORMAT: + tar.close() tar = tarfile.open(tmpname, encoding="ascii") t = tar.getmember("foo") self.assertEqual(t.uname, "\udce4\udcf6\udcfc") |