]> granicus.if.org Git - python/commitdiff
Oops, create TESTFN_UNENCODEABLE from TEST_FN, not TESTFN_UNICODE
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 13 Aug 2010 13:45:00 +0000 (13:45 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 13 Aug 2010 13:45:00 +0000 (13:45 +0000)
test_imp fails on Linux with C locale because TESTFN_UNICODE is not encodable
to ascii.

Lib/test/support.py

index 42e2acb616fda2a5d26c39bf2cafee1d061cbb5d..54e0599201803d3099330fd105ba75d44e1825c3 100644 (file)
@@ -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