Skip to content

Commit

Permalink
Changed importError to ModuleNotFoundError
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhuverma committed Apr 16, 2024
1 parent 5884424 commit 3a26211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_pytest/outcomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def importorskip(
warnings.simplefilter("ignore")
try:
__import__(modname)
except ImportError as exc:
except ModuleNotFoundError as exc:

Check warning on line 228 in src/_pytest/outcomes.py

View check run for this annotation

Codecov / codecov/patch

src/_pytest/outcomes.py#L228

Added line #L228 was not covered by tests
if reason is None:
reason = f"could not import {modname!r}: {exc}"
raise Skipped(reason, allow_module_level=True) from None
Expand Down

0 comments on commit 3a26211

Please sign in to comment.