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

Function test_recwarn_functional

testing/test_recwarn.py:16–27  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

14
15
16def test_recwarn_functional(pytester: Pytester) -> None:
17 pytester.makepyfile(
18 """
19 import warnings
20 def test_method(recwarn):
21 warnings.warn("hello")
22 warn = recwarn.pop()
23 assert isinstance(warn.message, UserWarning)
24 """
25 )
26 reprec = pytester.inline_run()
27 reprec.assertoutcome(passed=1)
28
29
30@pytest.mark.filterwarnings("")

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected