(pytester: Pytester)
| 17 | |
| 18 | |
| 19 | def test_recwarn_functional(pytester: Pytester) -> None: |
| 20 | pytester.makepyfile( |
| 21 | """ |
| 22 | import warnings |
| 23 | def test_method(recwarn): |
| 24 | warnings.warn("hello") |
| 25 | warn = recwarn.pop() |
| 26 | assert isinstance(warn.message, UserWarning) |
| 27 | """ |
| 28 | ) |
| 29 | reprec = pytester.inline_run() |
| 30 | reprec.assertoutcome(passed=1) |
| 31 | |
| 32 | |
| 33 | @pytest.mark.filterwarnings("") |
nothing calls this directly
no test coverage detected