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

Function test_multiline_complete_statement_without_terminator

tests/test_cmd2.py:1884–1894  ·  view source on GitHub ↗
(multiline_app, monkeypatch)

Source from the content-addressed store, hash-verified

1882
1883
1884def test_multiline_complete_statement_without_terminator(multiline_app, monkeypatch) -> None:
1885 read_command_mock = mock.MagicMock(name="_read_command_line", return_value="\n")
1886 monkeypatch.setattr("cmd2.Cmd._read_command_line", read_command_mock)
1887
1888 command = "orate"
1889 args = "hello world"
1890 line = f"{command} {args}"
1891 statement = multiline_app._complete_statement(line)
1892 assert statement == args
1893 assert statement.command == command
1894 assert statement.multiline_command
1895
1896
1897def test_multiline_complete_statement_with_unclosed_quotes(multiline_app, monkeypatch) -> None:

Callers

nothing calls this directly

Calls 1

_complete_statementMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…