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

Method _assert_state

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

Source from the content-addressed store, hash-verified

381 )
382
383 def _assert_state(self, op: str, states: Tuple[str, ...]) -> None:
384 assert (
385 self._state in states
386 ), "cannot {} in state {!r}: expected one of {}".format(
387 op, self._state, ", ".join(states)
388 )
389
390 def start(self) -> None:
391 """Start capturing on targetfd using memorized tmpfile."""

Callers 8

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

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected