Skip to content

Commit e0f0ee7

Browse files
committed
Sync with current cpython branch of importlib_metadata
1 parent 985f0ab commit e0f0ee7

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

Lib/test/test_importlib/fixtures.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,6 @@ def build_files(file_defs, prefix=pathlib.Path()):
210210
f.write(DALS(contents))
211211

212212

213-
class FileBuilder:
214-
def unicode_filename(self):
215-
try:
216-
from test.support import os_helper
217-
except ImportError:
218-
# outside CPython, hard-code a unicode snowman
219-
return '☃'
220-
return os_helper.FS_NONASCII or \
221-
self.skip("File system does not support non-ascii.")
222-
223-
224213
def DALS(str):
225214
"Dedent and left-strip"
226215
return textwrap.dedent(str).lstrip()

Lib/test/test_importlib/test_main.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,16 +254,11 @@ def test_attr(self):
254254
assert self.ep.attr is None
255255

256256

257-
class FileSystem(
258-
fixtures.OnSysPath, fixtures.SiteDir, fixtures.FileBuilder,
259-
unittest.TestCase):
257+
class FileSystem(fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase):
260258
def test_unicode_dir_on_sys_path(self):
261259
"""
262260
Ensure a Unicode subdirectory of a directory on sys.path
263261
does not crash.
264262
"""
265-
fixtures.build_files(
266-
{self.unicode_filename(): {}},
267-
prefix=self.site_dir,
268-
)
263+
fixtures.build_files({'☃': {}}, prefix=self.site_dir)
269264
list(distributions())

0 commit comments

Comments
 (0)