(self, pytester: Pytester)
| 342 | assert callreport.wasxfail |
| 343 | |
| 344 | def test_xfail_xpassed_strict(self, pytester: Pytester) -> None: |
| 345 | item = pytester.getitem( |
| 346 | """ |
| 347 | import pytest |
| 348 | @pytest.mark.xfail(strict=True, reason="nope") |
| 349 | def test_func(): |
| 350 | assert 1 |
| 351 | """ |
| 352 | ) |
| 353 | reports = runtestprotocol(item, log=False) |
| 354 | assert len(reports) == 3 |
| 355 | callreport = reports[1] |
| 356 | assert callreport.failed |
| 357 | assert str(callreport.longrepr) == "[XPASS(strict)] nope" |
| 358 | assert not hasattr(callreport, "wasxfail") |
| 359 | |
| 360 | def test_xfail_run_anyway(self, pytester: Pytester) -> None: |
| 361 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected