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

Function test_shell_auto_completion

tools/shell/test/test_shell_basics.py:328–373  ·  view source on GitHub ↗
(temp_db)

Source from the content-addressed store, hash-verified

326
327
328def test_shell_auto_completion(temp_db) -> None:
329 test = ShellTest().add_argument(temp_db)
330 test.start()
331 test.send_statement(
332 "CREATE NODE TABLE coolTable(i STRING, longPropertyName STRING, autoCompleteUINT8 UIN\t"
333 )
334 test.send_statement("\t")
335 test.send_statement("\t")
336 test.send_statement("\t")
337 test.send_statement(", PRIMARY KEY(i));\n")
338 assert (
339 test.shell_process.expect_exact(
340 ["\u2502 Table coolTable has been created. \u2502", pexpect.EOF]
341 )
342 == 0
343 )
344
345 test.send_statement("ma\t")
346 test.send_statement("\t")
347 test.send_statement("\t")
348 test.send_statement("\x1b[Z")
349 test.send_statement(" (n:\t")
350 test.send_statement(") ret\t")
351 test.send_statement(" n.\t")
352 test.send_statement("\t")
353 test.send_finished_statement(";\r")
354 assert (
355 test.shell_process.expect_exact(
356 ["\u2502 n.longPropertyName \u2502", pexpect.EOF]
357 )
358 == 0
359 )
360
361 test.send_statement("c\t")
362 test.send_statement(" show_t\t")
363 test.send_statement("() ret\t")
364 test.send_finished_statement(" *;\n")
365 assert (
366 test.shell_process.expect_exact(["\u2502 coolTable \u2502", pexpect.EOF]) == 0
367 )
368
369 test.send_statement("match (a:coolTable)-[]->()-[]->(a:coolTable) ")
370 test.send_statement("r")
371 test.send_statement("eturn a.lon\t")
372 test.send_finished_statement(";\n")
373 assert test.shell_process.expect_exact(["(0 tuples)", pexpect.EOF]) == 0
374
375
376def test_double_semicolon(temp_db) -> None:

Callers

nothing calls this directly

Calls 5

ShellTestClass · 0.90
add_argumentMethod · 0.80
send_statementMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected