mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
3603cc5fdb
commit
11fd4e962d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue