Skip to content

Commit

Permalink
Revert "test_packages_distributions_all_module_types: Create valid im…
Browse files Browse the repository at this point in the history
…port names"

This reverts commit 70ff991.

This behavior was adopted in 5e8260c and subsequently adapted as part of python#443.
  • Loading branch information
jaraco committed Apr 9, 2023
1 parent 70ff991 commit 5dbe83c
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand All @@ -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(
Expand Down

0 comments on commit 5dbe83c

Please sign in to comment.