Verify that platform can be used with xfail statements.
(self, pytester: Pytester)
| 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.""" |
| 331 | item = pytester.getitem( |
| 332 | """ |
| 333 | import pytest |
| 334 | @pytest.mark.xfail("platform.platform() == platform.platform()") |
| 335 | def test_func(): |
| 336 | assert 0 |
| 337 | """ |
| 338 | ) |
| 339 | reports = runtestprotocol(item, log=False) |
| 340 | assert len(reports) == 3 |
| 341 | callreport = reports[1] |
| 342 | assert callreport.wasxfail |
| 343 | |
| 344 | def test_xfail_xpassed_strict(self, pytester: Pytester) -> None: |
| 345 | item = pytester.getitem( |
nothing calls this directly
no test coverage detected