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

Method test_parametrize_skip

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

Source from the content-addressed store, hash-verified

607 result.stdout.fnmatch_lines(["* 2 passed, 1 skipped in *"])
608
609 def test_parametrize_skip(self, pytester: Pytester) -> None:
610 pytester.makepyfile(
611 """
612 import pytest
613
614 m = pytest.mark.skip('')
615
616 @pytest.mark.parametrize('x', [0, 1, pytest.param(2, marks=m)])
617 def test_skip(x):
618 assert x < 2
619 """
620 )
621 result = pytester.runpytest()
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(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected