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 2641819 commit bbde277Copy full SHA for bbde277
tests/testing/contexts.py
@@ -1,14 +1,12 @@
1
import contextlib
2
from typing import Any
3
-from typing import Union
4
5
-import _pytest.python_api # type: ignore
6
import pytest # type: ignore
7
8
9
def expect_raise_if_exception(
10
expected: Any,
11
-) -> Union[_pytest.python_api.RaisesContext, contextlib.AbstractContextManager]:
+):
12
"""Create a context that expects a raised exception or no raised exception.
13
14
Args:
0 commit comments