From: Victor Stinner Date: Fri, 13 Aug 2010 13:45:00 +0000 (+0000) Subject: Oops, create TESTFN_UNENCODEABLE from TEST_FN, not TESTFN_UNICODE X-Git-Tag: v3.2a2~362 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=11fd4e962dae5c9695392ffa02e50eea35eec270;p=thirdparty%2FPython%2Fcpython.git Oops, create TESTFN_UNENCODEABLE from TEST_FN, not TESTFN_UNICODE test_imp fails on Linux with C locale because TESTFN_UNICODE is not encodable to ascii. --- diff --git a/Lib/test/support.py b/Lib/test/support.py index 42e2acb616fd..54e059920180 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -408,7 +408,7 @@ else: b'\xff'.decode(TESTFN_ENCODING) except UnicodeDecodeError: # 0xff will be encoded using the surrogate character u+DCFF - TESTFN_UNENCODEABLE = TESTFN_UNICODE \ + TESTFN_UNENCODEABLE = TESTFN + b'-\xff'.decode(TESTFN_ENCODING, 'surrogateescape') else: # File system encoding (eg. ISO-8859-* encodings) can encode