MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_read_input_eof

Function test_read_input_eof

tests/test_cmd2.py:2229–2235  ·  view source on GitHub ↗

Test that read_input passes up EOFErrors.

(base_app, monkeypatch)

Source from the content-addressed store, hash-verified

2227
2228
2229def test_read_input_eof(base_app, monkeypatch) -> None:
2230 """Test that read_input passes up EOFErrors."""
2231 read_raw_mock = mock.MagicMock(name="_read_raw_input", side_effect=EOFError)
2232 monkeypatch.setattr("cmd2.Cmd._read_raw_input", read_raw_mock)
2233
2234 with pytest.raises(EOFError):
2235 base_app.read_input("Prompt> ")
2236
2237
2238def test_read_secret(base_app, monkeypatch):

Callers

nothing calls this directly

Calls 1

read_inputMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…