diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-14 09:53:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-14 09:53:08 +0000 |
commit | 6d1cb3a9e9138ce198ec3e344ca2d0f865e0c762 (patch) | |
tree | 8cef3c436dc2a3c6301c5b61bc5d8f1362ee918e /test/test_naive_completion.py | |
parent | Adding upstream version 1.26.1. (diff) | |
download | mycli-upstream/1.27.0.tar.xz mycli-upstream/1.27.0.zip |
Adding upstream version 1.27.0.upstream/1.27.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_naive_completion.py')
-rw-r--r-- | test/test_naive_completion.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/test_naive_completion.py b/test/test_naive_completion.py index 32b2abd..0bc3bf8 100644 --- a/test/test_naive_completion.py +++ b/test/test_naive_completion.py @@ -21,7 +21,7 @@ def test_empty_string_completion(completer, complete_event): result = list(completer.get_completions( Document(text=text, cursor_position=position), complete_event)) - assert result == list(map(Completion, sorted(completer.all_completions))) + assert result == list(map(Completion, completer.all_completions)) def test_select_keyword_completion(completer, complete_event): @@ -39,9 +39,7 @@ def test_function_name_completion(completer, complete_event): result = list(completer.get_completions( Document(text=text, cursor_position=position), complete_event)) - assert result == list([ - Completion(text='MASTER', start_position=-2), - Completion(text='MAX', start_position=-2)]) + assert sorted(x.text for x in result) == ["MASTER", "MAX"] def test_column_name_completion(completer, complete_event): @@ -50,7 +48,7 @@ def test_column_name_completion(completer, complete_event): result = list(completer.get_completions( Document(text=text, cursor_position=position), complete_event)) - assert result == list(map(Completion, sorted(completer.all_completions))) + assert result == list(map(Completion, completer.all_completions)) def test_special_name_completion(completer, complete_event): |