Skip to content

Commit 7a5e025

Browse files
committed
Streamline the test to check one expectation (the standard dist-info expectation is handled by other tests above.
1 parent 67662d8 commit 7a5e025

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

tests/test_main.py

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -401,29 +401,15 @@ def test_packages_distributions_all_module_types(self):
401401

402402

403403
class PackagesDistributionsDistTest(
404-
fixtures.DistInfoPkg,
405404
fixtures.DistInfoSymlinkedPkg,
406405
unittest.TestCase,
407406
):
408-
def test_packages_distributions_on_dist_info(self):
407+
def test_packages_distributions_symlinked_top_level(self):
409408
"""
410-
Test _top_level_inferred() on various dist-info packages.
409+
Distribution is resolvable from a simple top-level symlink in RECORD.
410+
See #452.
411411
"""
412-
distributions = packages_distributions()
413-
414-
def import_names_from_package(package_name):
415-
return {
416-
import_name
417-
for import_name, package_names in distributions.items()
418-
if package_name in package_names
419-
}
420-
421-
# distinfo-pkg has one import ('mod') inferred from RECORD
422-
assert import_names_from_package('distinfo-pkg') == {'mod'}
423-
424-
# symlinked-pkg has one import ('symlinked') inderred from RECORD which
425-
# references a symlink to the real package dir elsewhere.
426-
assert import_names_from_package('symlinked-pkg') == {'symlinked'}
412+
assert packages_distributions()['symlinked'] == ['symlinked-pkg']
427413

428414

429415
class PackagesDistributionsEggTest(

0 commit comments

Comments
 (0)