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

Method getcapture

testing/test_capture.py:1146–1152  ·  view source on GitHub ↗
(self, **kw)

Source from the content-addressed store, hash-verified

1144
1145 @contextlib.contextmanager
1146 def getcapture(self, **kw):
1147 cap = self.__class__.captureclass(**kw)
1148 cap.start_capturing()
1149 try:
1150 yield cap
1151 finally:
1152 cap.stop_capturing()
1153
1154 def test_capturing_done_simple(self) -> None:
1155 with self.getcapture() as cap:

Calls 2

start_capturingMethod · 0.80
stop_capturingMethod · 0.80

Tested by

no test coverage detected