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

Method test_just_err_capture

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

Source from the content-addressed store, hash-verified

1156 assert not err
1157
1158 def test_just_err_capture(self) -> None:
1159 with self.getcapture(out=False, err=True) as cap:
1160 sys.stdout.write("hello")
1161 sys.stderr.write("world")
1162 out, err = cap.readouterr()
1163 assert err == "world"
1164 assert not out
1165
1166 def test_stdin_restored(self) -> None:
1167 old = sys.stdin

Callers

nothing calls this directly

Calls 3

getcaptureMethod · 0.95
writeMethod · 0.45
readouterrMethod · 0.45

Tested by

no test coverage detected