(pytester: Pytester)
| 825 | |
| 826 | @pytest.mark.filterwarnings("default") |
| 827 | def test_pytester_assert_outcomes_warnings(pytester: Pytester) -> None: |
| 828 | pytester.makepyfile( |
| 829 | """ |
| 830 | import warnings |
| 831 | |
| 832 | def test_with_warning(): |
| 833 | warnings.warn(UserWarning("some custom warning")) |
| 834 | """ |
| 835 | ) |
| 836 | result = pytester.runpytest() |
| 837 | result.assert_outcomes(passed=1, warnings=1) |
| 838 | # If warnings is not passed, it is not checked at all. |
| 839 | result.assert_outcomes(passed=1) |
| 840 | |
| 841 | |
| 842 | def test_pytester_outcomes_deselected(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected