Commit daac5f9f authored by Lars Gustäbel's avatar Lars Gustäbel

Issue #24838: Merge test_tarfile.py fix from 3.5.

parents 7c3e6848 ddd9917a
......@@ -1795,7 +1795,7 @@ class UstarUnicodeTest(UnicodeTest, unittest.TestCase):
self.assertRaises(exc, tar.addfile, t)
if exc is None:
with tarfile.open(tmpname, "r") as tar:
with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
for t in tar:
self.assertEqual(name, t.name)
break
......@@ -1821,7 +1821,7 @@ class UstarUnicodeTest(UnicodeTest, unittest.TestCase):
self.assertRaises(exc, tar.addfile, t)
if exc is None:
with tarfile.open(tmpname, "r") as tar:
with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
for t in tar:
self.assertEqual(name, t.linkname)
break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment