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

Method xtest_dynamic_xfail_set_during_setup

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

Source from the content-addressed store, hash-verified

517 )
518
519 def xtest_dynamic_xfail_set_during_setup(self, pytester: Pytester) -> None:
520 p = pytester.makepyfile(
521 """
522 import pytest
523 def setup_function(function):
524 pytest.mark.xfail(function)
525 def test_this():
526 assert 0
527 def test_that():
528 assert 1
529 """
530 )
531 result = pytester.runpytest(p, "-rxX")
532 result.stdout.fnmatch_lines(["*XFAIL*test_this*", "*XPASS*test_that*"])
533
534 def test_dynamic_xfail_no_run(self, pytester: Pytester) -> None:
535 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected