Skip to content

Commit

Permalink
Merge pull request pytest-dev#7492 from bluetech/xfail-mark-typing-fix
Browse files Browse the repository at this point in the history
mark: fix typing for `@pytest.mark.xfail(raises=...)`
  • Loading branch information
asottile committed Jul 13, 2020
2 parents 7f7a364 + 1a73e78 commit 358150c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/_pytest/mark/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
from _pytest.outcomes import fail
from _pytest.warning_types import PytestUnknownMarkWarning

if TYPE_CHECKING:
from typing import Type


EMPTY_PARAMETERSET_OPTION = "empty_parameter_set_mark"

Expand Down Expand Up @@ -413,7 +416,9 @@ def __call__( # noqa: F811
*conditions: Union[str, bool],
reason: str = ...,
run: bool = ...,
raises: Union[BaseException, Tuple[BaseException, ...]] = ...,
raises: Union[
"Type[BaseException]", Tuple["Type[BaseException]", ...]
] = ...,
strict: bool = ...
) -> MarkDecorator:
raise NotImplementedError()
Expand Down

0 comments on commit 358150c

Please sign in to comment.