mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-12915: Skip test_pkgutil.test_name_resolution() non-encodable filenames (GH-18720)
When filesystem encoding cannot encode the Unicode string used for a filename continue testing with the next example.
This commit is contained in:
parent
6df421fe87
commit
e0acec1541
1 changed files with 5 additions and 1 deletions
|
@ -246,7 +246,11 @@ class PkgutilTests(unittest.TestCase):
|
|||
|
||||
for uw in unicode_words:
|
||||
d = os.path.join(self.dirname, uw)
|
||||
os.makedirs(d, exist_ok=True)
|
||||
try:
|
||||
os.makedirs(d, exist_ok=True)
|
||||
except UnicodeEncodeError:
|
||||
# When filesystem encoding cannot encode uw: skip this test
|
||||
continue
|
||||
# make an empty __init__.py file
|
||||
f = os.path.join(d, '__init__.py')
|
||||
with open(f, 'w') as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue