MCPcopy
hub / github.com/pytest-dev/pytest / _assert_state

Method _assert_state

src/_pytest/capture.py:512–517  ·  view source on GitHub ↗
(self, op: str, states: tuple[str, ...])

Source from the content-addressed store, hash-verified

510 )
511
512 def _assert_state(self, op: str, states: tuple[str, ...]) -> None:
513 assert self._state in states, (
514 "cannot {} in state {!r}: expected one of {}".format(
515 op, self._state, ", ".join(states)
516 )
517 )
518
519 def start(self) -> None:
520 """Start capturing on targetfd using memorized tmpfile."""

Callers 12

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

Calls 2

joinMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected