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

Method test_select_starton

testing/test_mark.py:826–843  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

824 assert dlist[0].items[0].name == "test_1"
825
826 def test_select_starton(self, pytester: Pytester) -> None:
827 threepass = pytester.makepyfile(
828 test_threepass="""
829 def test_one(): assert 1
830 def test_two(): assert 1
831 def test_three(): assert 1
832 """
833 )
834 reprec = pytester.inline_run(
835 "-Wignore::pytest.PytestRemovedIn7Warning", "-k", "test_two:", threepass
836 )
837 passed, skipped, failed = reprec.listoutcomes()
838 assert len(passed) == 2
839 assert not failed
840 dlist = reprec.getcalls("pytest_deselected")
841 assert len(dlist) == 1
842 item = dlist[0].items[0]
843 assert item.name == "test_one"
844
845 def test_keyword_extra(self, pytester: Pytester) -> None:
846 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 4

listoutcomesMethod · 0.80
getcallsMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected