mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Try harder to fix test_tarfile under Windows buildbots
This commit is contained in:
parent
95f5560b46
commit
ab58b5f90e
1 changed files with 3 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue