diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-05-09 07:41:32 +0200 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-05-09 07:41:32 +0200 |
commit | 7a44987eeb00be1203b92a0ca5f5758d5eb90a8c (patch) | |
tree | 78695a7388e946ed5d6232096b2862b5b8517ab9 /Lib/test/test_tarfile.py | |
parent | 04370c611266f9f9fac7a4c5ea9d8b85220deef0 (diff) | |
parent | d86989c0e88f048c18c08d5ce7001c96f440a024 (diff) | |
download | cpython-7a44987eeb00be1203b92a0ca5f5758d5eb90a8c.tar.gz |
merge 11347.
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r-- | Lib/test/test_tarfile.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 8036c5cda1..ddde01ccc9 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -82,7 +82,7 @@ class UstarReadTest(ReadTest): def test_fileobj_iter(self): self.tar.extract("ustar/regtype", TEMPDIR) tarinfo = self.tar.getmember("ustar/regtype") - with open(os.path.join(TEMPDIR, "ustar/regtype"), "rU") as fobj1: + with open(os.path.join(TEMPDIR, "ustar/regtype"), "r") as fobj1: lines1 = fobj1.readlines() fobj2 = self.tar.extractfile(tarinfo) try: @@ -1319,7 +1319,7 @@ class UstarUnicodeTest(unittest.TestCase): self._test_unicode_filename("utf7") def test_utf8_filename(self): - self._test_unicode_filename("utf8") + self._test_unicode_filename("utf-8") def _test_unicode_filename(self, encoding): tar = tarfile.open(tmpname, "w", format=self.format, encoding=encoding, errors="strict") @@ -1398,7 +1398,7 @@ class GNUUnicodeTest(UstarUnicodeTest): def test_bad_pax_header(self): # Test for issue #8633. GNU tar <= 1.23 creates raw binary fields # without a hdrcharset=BINARY header. - for encoding, name in (("utf8", "pax/bad-pax-\udce4\udcf6\udcfc"), + for encoding, name in (("utf-8", "pax/bad-pax-\udce4\udcf6\udcfc"), ("iso8859-1", "pax/bad-pax-\xe4\xf6\xfc"),): with tarfile.open(tarname, encoding=encoding, errors="surrogateescape") as tar: try: @@ -1413,7 +1413,7 @@ class PAXUnicodeTest(UstarUnicodeTest): def test_binary_header(self): # Test a POSIX.1-2008 compatible header with a hdrcharset=BINARY field. - for encoding, name in (("utf8", "pax/hdrcharset-\udce4\udcf6\udcfc"), + for encoding, name in (("utf-8", "pax/hdrcharset-\udce4\udcf6\udcfc"), ("iso8859-1", "pax/hdrcharset-\xe4\xf6\xfc"),): with tarfile.open(tarname, encoding=encoding, errors="surrogateescape") as tar: try: |