Merge pull request #7492 from bluetech/xfail-mark-typing-fix

mark: fix typing for `@pytest.mark.xfail(raises=...)`
This commit is contained in:
Anthony Sottile 2020-07-13 16:46:35 -07:00 committed by GitHub
commit 358150c30e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -28,6 +28,9 @@ from _pytest.config import Config
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"
@ -413,7 +416,9 @@ if TYPE_CHECKING:
*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()