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

Method test_just_out_capture

testing/test_capture.py:1230–1236  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1228 assert out2 == "cap2\n"
1229
1230 def test_just_out_capture(self) -> None:
1231 with self.getcapture(out=True, err=False) as cap:
1232 sys.stdout.write("hello")
1233 sys.stderr.write("world")
1234 out, err = cap.readouterr()
1235 assert out == "hello"
1236 assert not err
1237
1238 def test_just_err_capture(self) -> None:
1239 with self.getcapture(out=False, err=True) as cap:

Callers

nothing calls this directly

Calls 3

getcaptureMethod · 0.95
writeMethod · 0.45
readouterrMethod · 0.45

Tested by

no test coverage detected