cpython: 8952fa2c475f (original) (raw)
Mercurial > cpython
changeset 83689:8952fa2c475f 2.7
Issue #17656: Skip test_extract_unicode_filenames if the FS encoding doesn't support non-ASCII filenames. [#17656]
Serhiy Storchaka storchaka@gmail.com | |
---|---|
date | Wed, 08 May 2013 21:52:31 +0300 |
parents | 5885c02120f0 |
children | 1823cf6e1084 |
files | Lib/test/test_zipfile.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_zipfile.py 10 |
line wrap: on
line diff
--- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -18,7 +18,14 @@ from tempfile import TemporaryFile from random import randint, random from unittest import skipUnless -from test.test_support import TESTFN, TESTFN_UNICODE, run_unittest, findfile, unlink +from test.test_support import TESTFN, TESTFN_UNICODE, TESTFN_ENCODING, [](#l1.8)
run_unittest, findfile, unlink[](#l1.9)
+except (UnicodeError, TypeError):
Either the file system encoding is None, or the file name
cannot be encoded in the file system encoding.
- TESTFN_UNICODE = None
TESTFN2 = TESTFN + "2" TESTFNDIR = TESTFN + "d" @@ -424,6 +431,7 @@ class TestsWithSourceFile(unittest.TestC with open(filename, 'rb') as f: self.assertEqual(f.read(), content)