MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_xfail_simple

Method test_xfail_simple

testing/test_skipping.py:292–306  ·  view source on GitHub ↗
(self, pytester: Pytester, strict: bool)

Source from the content-addressed store, hash-verified

290class TestXFail:
291 @pytest.mark.parametrize("strict", [True, False])
292 def test_xfail_simple(self, pytester: Pytester, strict: bool) -> None:
293 item = pytester.getitem(
294 """
295 import pytest
296 @pytest.mark.xfail(strict=%s)
297 def test_func():
298 assert 0
299 """
300 % strict
301 )
302 reports = runtestprotocol(item, log=False)
303 assert len(reports) == 3
304 callreport = reports[1]
305 assert callreport.skipped
306 assert callreport.wasxfail == ""
307
308 def test_xfail_xpassed(self, pytester: Pytester) -> None:
309 item = pytester.getitem(

Callers

nothing calls this directly

Calls 2

runtestprotocolFunction · 0.90
getitemMethod · 0.45

Tested by

no test coverage detected