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

Method test_reset_twice_error

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

Source from the content-addressed store, hash-verified

1193 assert out == "hxąć\n"
1194
1195 def test_reset_twice_error(self) -> None:
1196 with self.getcapture() as cap:
1197 print("hello")
1198 out, err = cap.readouterr()
1199 with pytest.raises(ValueError):
1200 cap.stop_capturing()
1201 assert out == "hello\n"
1202 assert not err
1203
1204 def test_capturing_modify_sysouterr_in_between(self) -> None:
1205 oldout = sys.stdout

Callers

nothing calls this directly

Calls 3

getcaptureMethod · 0.95
stop_capturingMethod · 0.80
readouterrMethod · 0.45

Tested by

no test coverage detected