Commit 36a6a8bc authored by Jason R. Coombs's avatar Jason R. Coombs

Remove usage relying on deprecated and ambiguous leading slash. Ref #1635

parent 1b935caf
......@@ -1932,7 +1932,7 @@ def find_eggs_in_zip(importer, path_item, only=False):
if only:
# don't yield nested distros
return
for subitem in metadata.resource_listdir('/'):
for subitem in metadata.resource_listdir(''):
if _is_egg_path(subitem):
subpath = os.path.join(path_item, subitem)
dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath)
......
......@@ -93,7 +93,6 @@ class TestZipProvider:
expected_root = ['data.dat', 'mod.py', 'subdir']
assert sorted(zp.resource_listdir('')) == expected_root
assert sorted(zp.resource_listdir('/')) == expected_root
expected_subdir = ['data2.dat', 'mod2.py']
assert sorted(zp.resource_listdir('subdir')) == expected_subdir
......@@ -106,7 +105,6 @@ class TestZipProvider:
zp2 = pkg_resources.ZipProvider(mod2)
assert sorted(zp2.resource_listdir('')) == expected_subdir
assert sorted(zp2.resource_listdir('/')) == expected_subdir
assert zp2.resource_listdir('subdir') == []
assert zp2.resource_listdir('subdir/') == []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment