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

Method test_just_out_capture

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

Source from the content-addressed store, hash-verified

1148 assert out2 == "cap2\n"
1149
1150 def test_just_out_capture(self) -> None:
1151 with self.getcapture(out=True, err=False) as cap:
1152 sys.stdout.write("hello")
1153 sys.stderr.write("world")
1154 out, err = cap.readouterr()
1155 assert out == "hello"
1156 assert not err
1157
1158 def test_just_err_capture(self) -> None:
1159 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