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

Method close

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

Source from the content-addressed store, hash-verified

823 self._capture.start_capturing()
824
825 def close(self) -> None:
826 if self._capture is not None:
827 out, err = self._capture.pop_outerr_to_orig()
828 self._captured_out += out
829 self._captured_err += err
830 self._capture.stop_capturing()
831 self._capture = None
832
833 def readouterr(self) -> CaptureResult[AnyStr]:
834 """Read and return the captured output so far, resetting the internal

Callers 15

pytest_unconfigureFunction · 0.45
set_log_pathMethod · 0.45
pytest_unconfigureMethod · 0.45
create_cleanup_lockFunction · 0.45
popenMethod · 0.45
runMethod · 0.45
unset_tracingFunction · 0.45
pytest_unconfigureFunction · 0.45
doneMethod · 0.45
doneMethod · 0.45
deactivate_fixtureMethod · 0.45
capsysFunction · 0.45

Calls 2

pop_outerr_to_origMethod · 0.80
stop_capturingMethod · 0.80

Tested by 11

popenMethod · 0.36
runMethod · 0.36
test_zipfileMethod · 0.36
test_textMethod · 0.36
test_textMethod · 0.36
tmpfileFunction · 0.36
saved_fdFunction · 0.36