Skip to content

Commit

Permalink
Remove use of _pytest.compat
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <mgorny@gentoo.org>
  • Loading branch information
mgorny committed Jul 15, 2024
1 parent a913705 commit 9f07b5e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pytest_import_check/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
from pathlib import Path
from types import ModuleType

from _pytest.compat import assert_never


class ImportMode(Enum):
"""Possible values for `mode` parameter of `import_path`."""
Expand Down Expand Up @@ -136,7 +134,7 @@ def import_path(
if str(pkg_root) != sys.path[0]:
sys.path.insert(0, str(pkg_root))
else:
assert_never(mode)
assert False, f"invalid import mode: {mode}"

importlib.import_module(module_name)

Expand Down

0 comments on commit 9f07b5e

Please sign in to comment.