From c2ca32d9aef458067d61706158673d8a0920722c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 17 Mar 2003 18:30:15 +0000 Subject: [PATCH] Test for UnicodeError instead of ImportError to determine whether the test file name can be encoded. --- Lib/test/test_unicode_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py index 6d7dec5502..255cea3933 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.") -- 2.50.1