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:
Victor Stinner 2010-08-13 13:45:00 +00:00
parent 3603cc5fdb
commit 11fd4e962d
1 changed files with 1 additions and 1 deletions

View 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