Fix check

This commit is contained in:
Bruno Oliveira 2024-04-25 20:59:41 -03:00
parent b59336ac47
commit 76fd0e5a5a
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ def importorskip(
reason = f"could not import {modname!r}: {exc}"
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 = [
"",
f"Module '{modname}' was found, but when imported by pytest it raised:",