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

Method test_warn_stacklevel

testing/test_recwarn.py:58–62  ·  view source on GitHub ↗

#4243

(self)

Source from the content-addressed store, hash-verified

56 pytest.raises(AssertionError, rec.pop)
57
58 def test_warn_stacklevel(self) -> None:
59 """#4243"""
60 rec = WarningsRecorder(_ispytest=True)
61 with rec:
62 warnings.warn("test", DeprecationWarning, 2)
63
64 def test_typechecking(self) -> None:
65 from _pytest.recwarn import WarningsChecker

Callers

nothing calls this directly

Calls 2

WarningsRecorderClass · 0.90
warnMethod · 0.45

Tested by

no test coverage detected