diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-03-17 18:30:15 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-03-17 18:30:15 (GMT) |
commit | c2ca32d9aef458067d61706158673d8a0920722c (patch) | |
tree | 2f449604a1b5df78397eb4dc0e00586c66923cdd | |
parent | 54e7d2c0295ae53b31f54b2726bf8333a6374667 (diff) | |
download | cpython-c2ca32d9aef458067d61706158673d8a0920722c.zip cpython-c2ca32d9aef458067d61706158673d8a0920722c.tar.gz cpython-c2ca32d9aef458067d61706158673d8a0920722c.tar.bz2 |
Test for UnicodeError instead of ImportError to determine whether
the test file name can be encoded.
-rw-r--r-- | Lib/test/test_unicode_file.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py index 6d7dec5..255cea3 100644 --- a/Lib/test/test_unicode_file.py +++ b/Lib/test/test_unicode_file.py @@ -7,7 +7,7 @@ from test.test_support import verify, TestSkipped, TESTFN_UNICODE from test.test_support import TESTFN_ENCODING try: TESTFN_ENCODED = TESTFN_UNICODE.encode(TESTFN_ENCODING) -except (ImportError, TypeError): +except (UnicodeError, TypeError): # Either the file system encoding is None, or the file name # cannot be encoded in the file system encoding. raise TestSkipped("No Unicode filesystem semantics on this platform.") |