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