We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6921c9a commit 575bbffCopy full SHA for 575bbff
tests/conftest.py
@@ -13,6 +13,7 @@
13
from hashlib import sha512
14
from io import StringIO
15
from pathlib import Path
16
+from typing import Type, cast
17
18
import pytest
19
from _pytest._code.code import ExceptionInfo, TerminalRepr
@@ -274,7 +275,7 @@ def pytest_runtest_makereport(item, call):
274
275
if not isinstance(excinfo, ExceptionInfo):
276
_outcome = "failed"
277
longrepr = excinfo
- elif excinfo.errisinstance(skip.Exception): # type: ignore
278
+ elif excinfo.errisinstance(cast(Type[Exception], skip.Exception)):
279
_outcome = "skipped"
280
r = excinfo._getreprcrash()
281
longrepr = (str(r.path), r.lineno, r.message) if r is not None else excinfo
0 commit comments