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

Function test_read_raw_input_interactive_pipe

tests/test_cmd2.py:2076–2085  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

2074
2075
2076def 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
2088def test_read_raw_input_non_interactive_pipe_echo_off(capsys) -> None:

Callers

nothing calls this directly

Calls 1

_read_raw_inputMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…