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

Method stop_capturing

src/_pytest/capture.py:579–589  ·  view source on GitHub ↗

Stop capturing and reset capturing streams.

(self)

Source from the content-addressed store, hash-verified

577 self._in_suspended = False
578
579 def stop_capturing(self) -> None:
580 """Stop capturing and reset capturing streams."""
581 if self._state == "stopped":
582 raise ValueError("was already stopped")
583 self._state = "stopped"
584 if self.out:
585 self.out.done()
586 if self.err:
587 self.err.done()
588 if self.in_:
589 self.in_.done()
590
591 def is_started(self) -> bool:
592 """Whether actively capturing -- not suspended or stopped."""

Callers 9

runpytest_inprocessMethod · 0.80
stop_global_capturingMethod · 0.80
closeMethod · 0.80
test_init_capturingMethod · 0.80
getcaptureMethod · 0.80
test_manyMethod · 0.80

Calls 1

doneMethod · 0.45

Tested by 7

runpytest_inprocessMethod · 0.64
test_init_capturingMethod · 0.64
getcaptureMethod · 0.64
test_manyMethod · 0.64