From 5dbe83cdb0565e13f5a57629a6a9a334e07ebe93 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Apr 2023 15:49:38 -0400 Subject: [PATCH] Revert "test_packages_distributions_all_module_types: Create valid import names" This reverts commit 70ff991377f8d0848865c8c210edd2c7c41c119c. This behavior was adopted in 5e8260c8e545d7f21c779fb8b57004bc280ae330 and subsequently adapted as part of #443. --- tests/test_main.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/test_main.py b/tests/test_main.py index 883b4487..8225e2d1 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -342,10 +342,10 @@ def test_packages_distributions_all_module_types(self): filenames = list( itertools.chain.from_iterable( [ - f'top_level_{i}{suffix}', - f'in_namespace_{i}/mod{suffix}', - f'in_package_{i}/__init__.py', - f'in_package_{i}/mod{suffix}', + f'{i}-top-level{suffix}', + f'{i}-in-namespace/mod{suffix}', + f'{i}-in-package/__init__.py', + f'{i}-in-package/mod{suffix}', ] for i, suffix in enumerate(suffixes) ) @@ -367,14 +367,9 @@ def test_packages_distributions_all_module_types(self): distributions = packages_distributions() for i in range(len(suffixes)): - assert distributions[f'top_level_{i}'] == ['all_distributions'] - assert distributions[f'in_namespace_{i}'] == ['all_distributions'] - assert distributions[f'in_package_{i}'] == ['all_distributions'] - - # All keys returned from packages_distributions() should be valid import - # names, which means that they must _at least_ be valid identifiers: - for import_name in distributions.keys(): - assert import_name.isidentifier(), import_name + assert distributions[f'{i}-top-level'] == ['all_distributions'] + assert distributions[f'{i}-in-namespace'] == ['all_distributions'] + assert distributions[f'{i}-in-package'] == ['all_distributions'] class PackagesDistributionsEggTest(