(multiline_app, monkeypatch)
| 1907 | |
| 1908 | |
| 1909 | def test_multiline_input_line_to_statement(multiline_app, monkeypatch) -> None: |
| 1910 | # Verify _input_line_to_statement saves the fully entered input line for multiline commands |
| 1911 | read_command_mock = mock.MagicMock(name="_read_command_line", side_effect=["person", "\n"]) |
| 1912 | monkeypatch.setattr("cmd2.Cmd._read_command_line", read_command_mock) |
| 1913 | |
| 1914 | line = "orate hi" |
| 1915 | statement = multiline_app._input_line_to_statement(line) |
| 1916 | assert statement.raw == "orate hi\nperson\n\n" |
| 1917 | assert statement == "hi person" |
| 1918 | assert statement.command == "orate" |
| 1919 | assert statement.multiline_command |
| 1920 | |
| 1921 | |
| 1922 | def test_multiline_history_added(multiline_app, monkeypatch) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…