mirror of
https://github.com/python/cpython.git
synced 2025-10-01 12:52:18 +00:00
[3.9] bpo-43288: Fix bug in test_importlib test. (GH-24616)
* bpo-43288: Fix bug in test_importlib test. (GH-24612) * Fix failed merge of bpo-43288. (GH-24614)
This commit is contained in:
parent
693aeacf88
commit
44fe32061d
2 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,7 @@ import pathlib
|
||||||
import tempfile
|
import tempfile
|
||||||
import textwrap
|
import textwrap
|
||||||
import contextlib
|
import contextlib
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
|
@ -220,6 +221,9 @@ class FileBuilder:
|
||||||
return test.support.FS_NONASCII or \
|
return test.support.FS_NONASCII or \
|
||||||
self.skip("File system does not support non-ascii.")
|
self.skip("File system does not support non-ascii.")
|
||||||
|
|
||||||
|
def skip(self, reason):
|
||||||
|
raise unittest.SkipTest(reason)
|
||||||
|
|
||||||
|
|
||||||
def DALS(str):
|
def DALS(str):
|
||||||
"Dedent and left-strip"
|
"Dedent and left-strip"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Fix test_importlib to correctly skip Unicode file tests if the fileystem
|
||||||
|
does not support them.
|
Loading…
Add table
Add a link
Reference in a new issue