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

Method test_deselected

testing/test_terminal.py:674–691  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

672
673class TestTerminalFunctional:
674 def test_deselected(self, pytester: Pytester) -> None:
675 testpath = pytester.makepyfile(
676 """
677 def test_one():
678 pass
679 def test_two():
680 pass
681 def test_three():
682 pass
683 """
684 )
685 result = pytester.runpytest(
686 "-Wignore::pytest.PytestRemovedIn7Warning", "-k", "test_two:", testpath
687 )
688 result.stdout.fnmatch_lines(
689 ["collected 3 items / 1 deselected / 2 selected", "*test_deselected.py ..*"]
690 )
691 assert result.ret == 0
692
693 def test_deselected_with_hookwrapper(self, pytester: Pytester) -> None:
694 pytester.makeconftest(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected