Fix check
This commit is contained in:
parent
b59336ac47
commit
76fd0e5a5a
|
@ -269,7 +269,7 @@ def importorskip(
|
||||||
reason = f"could not import {modname!r}: {exc}"
|
reason = f"could not import {modname!r}: {exc}"
|
||||||
skipped = Skipped(reason, allow_module_level=True)
|
skipped = Skipped(reason, allow_module_level=True)
|
||||||
|
|
||||||
if warn_on_import_error and not issubclass(exc, ModuleNotFoundError):
|
if warn_on_import_error and not isinstance(exc, ModuleNotFoundError):
|
||||||
lines = [
|
lines = [
|
||||||
"",
|
"",
|
||||||
f"Module '{modname}' was found, but when imported by pytest it raised:",
|
f"Module '{modname}' was found, but when imported by pytest it raised:",
|
||||||
|
|
Loading…
Reference in New Issue