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

Method test_just_err_capture

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

Source from the content-addressed store, hash-verified

1236 assert not err
1237
1238 def test_just_err_capture(self) -> None:
1239 with self.getcapture(out=False, err=True) as cap:
1240 sys.stdout.write("hello")
1241 sys.stderr.write("world")
1242 out, err = cap.readouterr()
1243 assert err == "world"
1244 assert not out
1245
1246 def test_stdin_restored(self) -> None:
1247 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