From 2411a2dd8283279cf8c4f9ffcd830271506ed3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 9 Nov 2002 19:57:26 +0000 Subject: Don't try to convert the test filename to Unicode with -U. --- Lib/test/test_support.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 2e4c93a..075d83b 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -92,7 +92,12 @@ elif os.name != 'riscos': TESTFN = '@test' # Unicode name only used if TEST_FN_ENCODING exists for the platform. if have_unicode: - TESTFN_UNICODE=unicode("@test-\xe0\xf2", "latin-1") # 2 latin characters. + if isinstance('', unicode): + # python -U + # XXX perhaps unicode() should accept Unicode strings? + TESTFN_UNICODE="@test-\xe0\xf2" + else: + TESTFN_UNICODE=unicode("@test-\xe0\xf2", "latin-1") # 2 latin characters. if os.name=="nt": TESTFN_ENCODING="mbcs" else: -- cgit v0.12