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

Method test_parametrize_skipif_no_skip

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

Source from the content-addressed store, hash-verified

622 result.stdout.fnmatch_lines(["* 2 passed, 1 skipped in *"])
623
624 def test_parametrize_skipif_no_skip(self, pytester: Pytester) -> None:
625 pytester.makepyfile(
626 """
627 import pytest
628
629 m = pytest.mark.skipif('False')
630
631 @pytest.mark.parametrize('x', [0, 1, m(2)])
632 def test_skipif_no_skip(x):
633 assert x < 2
634 """
635 )
636 result = pytester.runpytest()
637 result.stdout.fnmatch_lines(["* 1 failed, 2 passed in *"])
638
639 def test_parametrize_xfail(self, pytester: Pytester) -> None:
640 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