diff options
author | Amjith Ramanujam <amjith.r@gmail.com> | 2015-08-23 01:43:54 -0700 |
---|---|---|
committer | Amjith Ramanujam <amjith.r@gmail.com> | 2015-08-23 01:43:54 -0700 |
commit | 65398f00516f78d719aa1c616d2bc5861d26a8e8 (patch) | |
tree | 681e66cd312d6195dd4a3a0fbce8deb839724dc1 /tests/test_smart_completion_public_schema_only.py | |
parent | ee48fb857d182c4deddad23e40bc91d6b75e14ab (diff) |
Fix failing tests.
Diffstat (limited to 'tests/test_smart_completion_public_schema_only.py')
-rw-r--r-- | tests/test_smart_completion_public_schema_only.py | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py index 128ccdd1..2f75069d 100644 --- a/tests/test_smart_completion_public_schema_only.py +++ b/tests/test_smart_completion_public_schema_only.py @@ -96,8 +96,9 @@ def test_builtin_function_name_completion(completer, complete_event): position = len('SELECT MA') result = completer.get_completions( Document(text=text, cursor_position=position), complete_event) - assert set(result) == set([Completion(text='MAX', start_position=-2, - display_meta='function')]) + assert set(result) == set([Completion(text='MAX', start_position=-2, display_meta='function'), + Completion(text='MAXEXTENTS', start_position=-2, display_meta='keyword'), + ]) def test_builtin_function_matches_only_at_start(completer, complete_event): @@ -118,7 +119,9 @@ def test_user_function_name_completion(completer, complete_event): Document(text=text, cursor_position=position), complete_event) assert set(result) == set([ Completion(text='custom_func1', start_position=-2, display_meta='function'), - Completion(text='custom_func2', start_position=-2, display_meta='function')]) + Completion(text='custom_func2', start_position=-2, display_meta='function'), + Completion(text='CURRENT', start_position=-2, display_meta='keyword'), + ]) def test_user_function_name_completion_matches_anywhere(completer, @@ -152,7 +155,9 @@ def test_suggested_column_names_from_visible_table(completer, complete_event): Completion(text='last_name', start_position=0, display_meta='column'), Completion(text='custom_func1', start_position=0, display_meta='function'), Completion(text='custom_func2', start_position=0, display_meta='function')] + - list(map(lambda f: Completion(f, display_meta='function'), completer.functions))) + list(map(lambda f: Completion(f, display_meta='function'), completer.functions)) + + list(map(lambda x: Completion(x, display_meta='keyword'), completer.keywords)) + ) def test_suggested_column_names_in_function(completer, complete_event): @@ -234,7 +239,9 @@ def test_suggested_multiple_column_names(completer, complete_event): Completion(text='last_name', start_position=0, display_meta='column'), Completion(text='custom_func1', start_position=0, display_meta='function'), Completion(text='custom_func2', start_position=0, display_meta='function')] + - list(map(lambda f: Completion(f, display_meta='function'), completer.functions))) + list(map(lambda f: Completion(f, display_meta='function'), completer.functions)) + + list(map(lambda x: Completion(x, display_meta='keyword'), completer.keywords)) + ) def test_suggested_multiple_column_names_with_alias(completer, complete_event): """ @@ -363,7 +370,9 @@ def test_auto_escaped_col_names(completer, complete_event): Completion(text='"ABC"', start_position=0, display_meta='column'), Completion(text='custom_func1', start_position=0, display_meta='function'), Completion(text='custom_func2', start_position=0, display_meta='function')] + - list(map(lambda f: Completion(f, display_meta='function'), completer.functions))) + list(map(lambda f: Completion(f, display_meta='function'), completer.functions)) + + list(map(lambda x: Completion(x, display_meta='keyword'), completer.keywords)) + ) @pytest.mark.parametrize('text', [ @@ -396,4 +405,4 @@ def test_suggest_columns_from_escaped_table_alias(completer, complete_event): Completion(text='id', start_position=0, display_meta='column'), Completion(text='"insert"', start_position=0, display_meta='column'), Completion(text='"ABC"', start_position=0, display_meta='column'), - ])
\ No newline at end of file + ]) |