MCPcopy
hub / github.com/pytest-dev/pytest / test_recwarn_stacklevel

Function test_recwarn_stacklevel

testing/test_recwarn.py:13–16  ·  testing/test_recwarn.py::test_recwarn_stacklevel
(recwarn: WarningsRecorder)

Source from the content-addressed store, hash-verified

11
12
13def test_recwarn_stacklevel(recwarn: WarningsRecorder) -> None:
14 warnings.warn(class="st">"hello")
15 warn = recwarn.pop()
16 assert warn.filename == __file__
17
18
19def test_recwarn_functional(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 2

popMethod · 0.80
warnMethod · 0.45

Tested by

no test coverage detected