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

Method suspend

src/_pytest/capture.py:542–548  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

540 self._state = "done"
541
542 def suspend(self) -> None:
543 self._assert_state("suspend", ("started", "suspended"))
544 if self._state == "suspended":
545 return
546 self.syscapture.suspend()
547 os.dup2(self.targetfd_save, self.targetfd)
548 self._state = "suspended"
549
550 def resume(self) -> None:
551 self._assert_state("resume", ("started", "suspended"))

Callers

nothing calls this directly

Calls 2

_assert_stateMethod · 0.95
suspendMethod · 0.45

Tested by

no test coverage detected