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

Function test_warnings_checker_twice

testing/test_warnings.py:574–580  ·  view source on GitHub ↗

Issue #4617

()

Source from the content-addressed store, hash-verified

572
573
574def test_warnings_checker_twice() -> None:
575 """Issue #4617"""
576 expectation = pytest.warns(UserWarning)
577 with expectation:
578 warnings.warn("Message A", UserWarning)
579 with expectation:
580 warnings.warn("Message B", UserWarning)
581
582
583@pytest.mark.filterwarnings("always::UserWarning")

Callers

nothing calls this directly

Calls 1

warnMethod · 0.45

Tested by

no test coverage detected