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

Method test_warn_stacklevel

testing/test_recwarn.py:103–107  ·  view source on GitHub ↗

#4243

(self)

Source from the content-addressed store, hash-verified

101 rec.pop()
102
103 def test_warn_stacklevel(self) -> None:
104 """#4243"""
105 rec = WarningsRecorder(_ispytest=True)
106 with rec:
107 warnings.warn("test", DeprecationWarning, 2)
108
109 def test_typechecking(self) -> None:
110 from _pytest.recwarn import WarningsChecker

Callers

nothing calls this directly

Calls 2

WarningsRecorderClass · 0.90
warnMethod · 0.45

Tested by

no test coverage detected