MCPcopy
hub / github.com/pytest-dev/pytest / test_xfail_evalfalse_but_fails

Method test_xfail_evalfalse_but_fails

testing/test_skipping.py:403–416  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

401 result.stdout.fnmatch_lines(expected)
402
403 def test_xfail_evalfalse_but_fails(self, pytester: Pytester) -> None:
404 item = pytester.getitem(
405 """
406 import pytest
407 @pytest.mark.xfail('False')
408 def test_func():
409 assert 0
410 """
411 )
412 reports = runtestprotocol(item, log=False)
413 callreport = reports[1]
414 assert callreport.failed
415 assert not hasattr(callreport, "wasxfail")
416 assert "xfail" in callreport.keywords
417
418 def test_xfail_not_report_default(self, pytester: Pytester) -> None:
419 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 2

runtestprotocolFunction · 0.90
getitemMethod · 0.45

Tested by

no test coverage detected