MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / test_tab_complete

Function test_tab_complete

tools/shell/test/test_shell_control_search.py:189–211  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

187
188@pytest.mark.parametrize("test", ["multiline", "singleline"], indirect=True)
189def test_tab_complete(test) -> None:
190 # test tab complete search and go to end of line
191 test.send_finished_statement("RETURN databases;\r")
192 assert (
193 test.shell_process.expect_exact(
194 [
195 "Error: Binder exception: Variable databases is not in scope.",
196 pexpect.EOF,
197 ],
198 )
199 == 0
200 )
201 test.send_control_statement(KEY_ACTION.CTRL_R.value)
202 test.send_statement("databases")
203 test.send_statement(KEY_ACTION.TAB.value)
204 test.send_statement(KEY_ACTION.BACKSPACE.value) # remove semicolon
205 test.send_statement("\x1b[D" * 9)
206 test.send_statement('"\x1b[F')
207 test.send_finished_statement(' rule" AS a;\r')
208 assert (
209 test.shell_process.expect_exact(["\u2502 databases rule \u2502", pexpect.EOF])
210 == 0
211 )
212
213
214@pytest.mark.parametrize("test", ["multiline", "singleline"], indirect=True)

Callers

nothing calls this directly

Calls 3

send_statementMethod · 0.80

Tested by

no test coverage detected