Skip to content

Commit

Permalink
Use importlib
Browse files Browse the repository at this point in the history
  • Loading branch information
rsokl committed Mar 23, 2024
1 parent 8c81703 commit 05172d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pkg_resources
import importlib.metadata

# Skip collection of tests that require additional dependencies
collect_ignore_glob = []
Expand All @@ -10,7 +10,7 @@
"phantom-types",
)

_installed = {pkg.key for pkg in pkg_resources.working_set}
_installed = {dist.metadata["Name"] for dist in importlib.metadata.distributions()}

if any(_module_name not in _installed for _module_name in OPTIONAL_TEST_DEPENDENCIES):
collect_ignore_glob.append("*third_party.py")

0 comments on commit 05172d3

Please sign in to comment.