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

Method test_parametrize_passed

testing/python/collect.py:654–667  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

652 result.stdout.fnmatch_lines(["* 2 passed, 1 xfailed in *"])
653
654 def test_parametrize_passed(self, pytester: Pytester) -> None:
655 pytester.makepyfile(
656 """
657 import pytest
658
659 m = pytest.mark.xfail('True')
660
661 @pytest.mark.parametrize('x', [0, 1, pytest.param(2, marks=m)])
662 def test_xfail(x):
663 pass
664 """
665 )
666 result = pytester.runpytest()
667 result.stdout.fnmatch_lines(["* 2 passed, 1 xpassed in *"])
668
669 def test_parametrize_xfail_passed(self, pytester: Pytester) -> None:
670 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