MCPcopy Create free account
hub / github.com/dbcli/pgcli / test_learn_keywords

Function test_learn_keywords

tests/test_smart_completion_public_schema_only.py:699–707  ·  view source on GitHub ↗
(completer)

Source from the content-addressed store, hash-verified

697
698@parametrize("completer", completers())
699def test_learn_keywords(completer):
700 history = "CREATE VIEW v AS SELECT 1"
701 completer.extend_query_history(history)
702
703 # Now that we've used `VIEW` once, it should be suggested ahead of other
704 # keywords starting with v.
705 text = "create v"
706 completions = get_result(completer, text)
707 assert completions[0].text == "VIEW"
708
709
710@parametrize("completer", completers(casing=False, aliasing=False))

Callers

nothing calls this directly

Calls 2

get_resultFunction · 0.90
extend_query_historyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…