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

Method test_reset_twice_error

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

Source from the content-addressed store, hash-verified

1114 assert out == "hxąć\n"
1115
1116 def test_reset_twice_error(self) -> None:
1117 with self.getcapture() as cap:
1118 print("hello")
1119 out, err = cap.readouterr()
1120 pytest.raises(ValueError, cap.stop_capturing)
1121 assert out == "hello\n"
1122 assert not err
1123
1124 def test_capturing_modify_sysouterr_in_between(self) -> None:
1125 oldout = sys.stdout

Callers

nothing calls this directly

Calls 2

getcaptureMethod · 0.95
readouterrMethod · 0.45

Tested by

no test coverage detected