MCPcopy
hub / github.com/dbcli/pgcli / test_function_name_completion

Function test_function_name_completion

tests/test_naive_completion.py:35–49  ·  view source on GitHub ↗
(completer, complete_event)

Source from the content-addressed store, hash-verified

33
34
35def test_function_name_completion(completer, complete_event):
36 text = "SELECT MA"
37 position = len("SELECT MA")
38 result = completions_to_set(completer.get_completions(Document(text=text, cursor_position=position), complete_event))
39 assert result == completions_to_set([
40 Completion(text="MATERIALIZED VIEW", start_position=-2),
41 Completion(text="MAX", start_position=-2),
42 Completion(text="MAXEXTENTS", start_position=-2),
43 Completion(text="MAKE_DATE", start_position=-2),
44 Completion(text="MAKE_TIME", start_position=-2),
45 Completion(text="MAKE_TIMESTAMPTZ", start_position=-2),
46 Completion(text="MAKE_INTERVAL", start_position=-2),
47 Completion(text="MASKLEN", start_position=-2),
48 Completion(text="MAKE_TIMESTAMP", start_position=-2),
49 ])
50
51
52def test_version_function_name_completion(completer, complete_event):

Callers

nothing calls this directly

Calls 2

completions_to_setFunction · 0.90
get_completionsMethod · 0.45

Tested by

no test coverage detected