(self, pytester: Pytester)
| 312 | assert callreport.wasxfail == "" |
| 313 | |
| 314 | def test_xfail_xpassed(self, pytester: Pytester) -> None: |
| 315 | item = pytester.getitem( |
| 316 | """ |
| 317 | import pytest |
| 318 | @pytest.mark.xfail(reason="this is an xfail") |
| 319 | def test_func(): |
| 320 | assert 1 |
| 321 | """ |
| 322 | ) |
| 323 | reports = runtestprotocol(item, log=False) |
| 324 | assert len(reports) == 3 |
| 325 | callreport = reports[1] |
| 326 | assert callreport.passed |
| 327 | assert callreport.wasxfail == "this is an xfail" |
| 328 | |
| 329 | def test_xfail_using_platform(self, pytester: Pytester) -> None: |
| 330 | """Verify that platform can be used with xfail statements.""" |
nothing calls this directly
no test coverage detected