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

Method _assert_state

src/_pytest/capture.py:262–267  ·  view source on GitHub ↗
(self, op: str, states: Tuple[str, ...])

Source from the content-addressed store, hash-verified

260 )
261
262 def _assert_state(self, op: str, states: Tuple[str, ...]) -> None:
263 assert (
264 self._state in states
265 ), "cannot {} in state {!r}: expected one of {}".format(
266 op, self._state, ", ".join(states)
267 )
268
269 def start(self) -> None:
270 self._assert_state("start", ("initialized",))

Callers 6

startMethod · 0.95
snapMethod · 0.95
doneMethod · 0.95
suspendMethod · 0.95
resumeMethod · 0.95
writeorgMethod · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected