Kaydet (Commit) 11fd4e96 authored tarafından Victor Stinner's avatar Victor Stinner

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.
üst 3603cc5f
...@@ -408,7 +408,7 @@ else: ...@@ -408,7 +408,7 @@ else:
b'\xff'.decode(TESTFN_ENCODING) b'\xff'.decode(TESTFN_ENCODING)
except UnicodeDecodeError: except UnicodeDecodeError:
# 0xff will be encoded using the surrogate character u+DCFF # 0xff will be encoded using the surrogate character u+DCFF
TESTFN_UNENCODEABLE = TESTFN_UNICODE \ TESTFN_UNENCODEABLE = TESTFN
+ b'-\xff'.decode(TESTFN_ENCODING, 'surrogateescape') + b'-\xff'.decode(TESTFN_ENCODING, 'surrogateescape')
else: else:
# File system encoding (eg. ISO-8859-* encodings) can encode # File system encoding (eg. ISO-8859-* encodings) can encode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment