MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_recwarn_stacklevel

Function test_recwarn_stacklevel

testing/test_recwarn.py:10–13  ·  view source on GitHub ↗
(recwarn: WarningsRecorder)

Source from the content-addressed store, hash-verified

8
9
10def test_recwarn_stacklevel(recwarn: WarningsRecorder) -> None:
11 warnings.warn("hello")
12 warn = recwarn.pop()
13 assert warn.filename == __file__
14
15
16def 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