(pytester: Pytester)
| 1199 | |
| 1200 | |
| 1201 | def test_xfail_test_setup_exception(pytester: Pytester) -> None: |
| 1202 | pytester.makeconftest( |
| 1203 | """ |
| 1204 | def pytest_runtest_setup(): |
| 1205 | 0 / 0 |
| 1206 | """ |
| 1207 | ) |
| 1208 | p = pytester.makepyfile( |
| 1209 | """ |
| 1210 | import pytest |
| 1211 | @pytest.mark.xfail |
| 1212 | def test_func(): |
| 1213 | assert 0 |
| 1214 | """ |
| 1215 | ) |
| 1216 | result = pytester.runpytest(p) |
| 1217 | assert result.ret == 0 |
| 1218 | assert "xfailed" in result.stdout.str() |
| 1219 | result.stdout.no_fnmatch_line("*xpassed*") |
| 1220 | |
| 1221 | |
| 1222 | def test_imperativeskip_on_xfail_test(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected