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

Method test_maxfail

testing/test_session.py:90–101  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

88 assert passed == skipped == 0
89
90 def test_maxfail(self, pytester: Pytester) -> None:
91 reprec = pytester.inline_runsource(
92 """
93 def test_one(): assert 0
94 def test_two(): assert 0
95 def test_three(): assert 0
96 """,
97 "--maxfail=2",
98 )
99 passed, skipped, failed = reprec.countoutcomes()
100 assert failed == 2
101 assert passed == skipped == 0
102
103 def test_broken_repr(self, pytester: Pytester) -> None:
104 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 2

countoutcomesMethod · 0.80
inline_runsourceMethod · 0.45

Tested by

no test coverage detected