Test that _read_command_line passes up EOFErrors.
(base_app, monkeypatch)
| 2218 | |
| 2219 | |
| 2220 | def test_read_command_line_eof(base_app, monkeypatch) -> None: |
| 2221 | """Test that _read_command_line passes up EOFErrors.""" |
| 2222 | read_raw_mock = mock.MagicMock(name="_read_raw_input", side_effect=EOFError) |
| 2223 | monkeypatch.setattr("cmd2.Cmd._read_raw_input", read_raw_mock) |
| 2224 | |
| 2225 | with pytest.raises(EOFError): |
| 2226 | base_app._read_command_line("Prompt> ") |
| 2227 | |
| 2228 | |
| 2229 | def test_read_input_eof(base_app, monkeypatch) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…