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

Function test_read_raw_input_tty

tests/test_cmd2.py:2062–2073  ·  view source on GitHub ↗
(base_app: cmd2.Cmd)

Source from the content-addressed store, hash-verified

2060 reason="Don't have a real Windows console with how we are currently running tests in GitHub Actions",
2061)
2062def test_read_raw_input_tty(base_app: cmd2.Cmd) -> None:
2063 with create_pipe_input() as pipe_input:
2064 base_app.main_session = PromptSession(
2065 input=pipe_input,
2066 output=DummyOutput(),
2067 history=base_app.main_session.history,
2068 completer=base_app.main_session.completer,
2069 )
2070 pipe_input.send_text("foo\n")
2071
2072 result = base_app._read_raw_input("prompt> ", base_app.main_session)
2073 assert result == "foo"
2074
2075
2076def test_read_raw_input_interactive_pipe(capsys) -> None:

Callers

nothing calls this directly

Calls 2

send_textMethod · 0.80
_read_raw_inputMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…