summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-11-09 19:57:26 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-11-09 19:57:26 (GMT)
commit2411a2dd8283279cf8c4f9ffcd830271506ed3d2 (patch)
treedd1b972852014aafbbf83135597cd94a9ba32ed3 /Lib/test/test_support.py
parent774348c8d6a6eaefe8d12a7c8d309801b73f7386 (diff)
downloadcpython-2411a2dd8283279cf8c4f9ffcd830271506ed3d2.zip
cpython-2411a2dd8283279cf8c4f9ffcd830271506ed3d2.tar.gz
cpython-2411a2dd8283279cf8c4f9ffcd830271506ed3d2.tar.bz2
Don't try to convert the test filename to Unicode with -U.
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py7
1 files changed, 6 insertions, 1 deletions
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: