mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-39791: Support file systems that cannot support non-ascii filenames (skipping tests in that case). (#20681)
This commit is contained in:
parent
47a23fc63f
commit
2efe18bf27
2 changed files with 18 additions and 2 deletions
|
@ -210,6 +210,17 @@ def build_files(file_defs, prefix=pathlib.Path()):
|
|||
f.write(DALS(contents))
|
||||
|
||||
|
||||
class FileBuilder:
|
||||
def unicode_filename(self):
|
||||
try:
|
||||
import test.support
|
||||
except ImportError:
|
||||
# outside CPython, hard-code a unicode snowman
|
||||
return '☃'
|
||||
return test.support.FS_NONASCII or \
|
||||
self.skip("File system does not support non-ascii.")
|
||||
|
||||
|
||||
def DALS(str):
|
||||
"Dedent and left-strip"
|
||||
return textwrap.dedent(str).lstrip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue