(capsys)
| 2074 | |
| 2075 | |
| 2076 | def test_read_raw_input_interactive_pipe(capsys) -> None: |
| 2077 | prompt = "prompt> " |
| 2078 | app = cmd2.Cmd(stdin=io.StringIO("input from pipe\n")) |
| 2079 | app.interactive_pipe = True |
| 2080 | result = app._read_raw_input(prompt, app.main_session) |
| 2081 | assert result == "input from pipe" |
| 2082 | |
| 2083 | # In interactive mode, _read_raw_input() prints the prompt. |
| 2084 | captured = capsys.readouterr() |
| 2085 | assert captured.out == prompt |
| 2086 | |
| 2087 | |
| 2088 | def test_read_raw_input_non_interactive_pipe_echo_off(capsys) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…