diff options
Diffstat (limited to 'Lib/test/test_importlib/fixtures.py')
-rw-r--r-- | Lib/test/test_importlib/fixtures.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/fixtures.py b/Lib/test/test_importlib/fixtures.py index b25febb..2e55d14 100644 --- a/Lib/test/test_importlib/fixtures.py +++ b/Lib/test/test_importlib/fixtures.py @@ -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() |