mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #16414: Add support.FS_NONASCII and support.TESTFN_NONASCII
These constants are used to test functions with non-ASCII data, especially filenames.
This commit is contained in:
parent
df1d940c7c
commit
8b219b2936
5 changed files with 42 additions and 12 deletions
|
@ -1243,6 +1243,8 @@ if sys.platform != 'win32':
|
|||
def setUp(self):
|
||||
if support.TESTFN_UNENCODABLE:
|
||||
self.dir = support.TESTFN_UNENCODABLE
|
||||
elif support.TESTFN_NONASCII:
|
||||
self.dir = support.TESTFN_NONASCII
|
||||
else:
|
||||
self.dir = support.TESTFN
|
||||
self.bdir = os.fsencode(self.dir)
|
||||
|
@ -1257,6 +1259,8 @@ if sys.platform != 'win32':
|
|||
add_filename(support.TESTFN_UNICODE)
|
||||
if support.TESTFN_UNENCODABLE:
|
||||
add_filename(support.TESTFN_UNENCODABLE)
|
||||
if support.TESTFN_NONASCII:
|
||||
add_filename(support.TESTFN_NONASCII)
|
||||
if not bytesfn:
|
||||
self.skipTest("couldn't create any non-ascii filename")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue