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

Method start

src/_pytest/capture.py:519–524  ·  view source on GitHub ↗

Start capturing on targetfd using memorized tmpfile.

(self)

Source from the content-addressed store, hash-verified

517 )
518
519 def start(self) -> None:
520 """Start capturing on targetfd using memorized tmpfile."""
521 self._assert_state("start", ("initialized",))
522 os.dup2(self.tmpfile.fileno(), self.targetfd)
523 self.syscapture.start()
524 self._state = "started"
525
526 def done(self) -> None:
527 """Stop capturing, restore streams, return original capture file,

Callers

nothing calls this directly

Calls 3

_assert_stateMethod · 0.95
filenoMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected