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

Method test_failfunction

testing/test_runner.py:131–144  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

129 assert not rep.longrepr
130
131 def test_failfunction(self, pytester: Pytester) -> None:
132 reports = pytester.runitem(
133 """
134 def test_func():
135 assert 0
136 """
137 )
138 rep = reports[1]
139 assert not rep.passed
140 assert not rep.skipped
141 assert rep.failed
142 assert rep.when == "call"
143 assert rep.outcome == "failed"
144 # assert isinstance(rep.longrepr, ReprExceptionInfo)
145
146 def test_skipfunction(self, pytester: Pytester) -> None:
147 reports = pytester.runitem(

Callers

nothing calls this directly

Calls 1

runitemMethod · 0.45

Tested by

no test coverage detected