Skip to content

Commit 2a6b90b

Browse files
committed
Fix importlib test logic
1 parent 9b66f3b commit 2a6b90b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,12 +689,10 @@ def test_installed_modules():
689689

690690
if importlib_available:
691691
importlib_distributions = {
692-
_normalize_distribution_name(dist.metadata.get("Name", None)): version(
693-
dist.metadata.get("Name", None)
694-
)
692+
_normalize_distribution_name(dist.metadata.get("Name", None)): dist.version
695693
for dist in distributions()
696694
if dist.metadata.get("Name", None) is not None
697-
and version(dist.metadata.get("Name", None)) is not None
695+
and dist.version is not None
698696
}
699697
assert installed_distributions == importlib_distributions
700698

0 commit comments

Comments
 (0)