From eb3ef2e143adfdc779489a7daab3a99c572bf08c Mon Sep 17 00:00:00 2001 From: Anthony Lai Date: Tue, 22 Mar 2016 22:08:21 -0700 Subject: unescape completion names for lexical priority --- tests/test_smart_completion_public_schema_only.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/test_smart_completion_public_schema_only.py') diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py index fce9b9e7..36ca6203 100644 --- a/tests/test_smart_completion_public_schema_only.py +++ b/tests/test_smart_completion_public_schema_only.py @@ -385,7 +385,14 @@ def test_table_names_after_from_are_lexical_ordered_by_text(completer, complete_ result = completer.get_completions( Document(text=text, cursor_position=position), complete_event) - assert result == sorted(result, key=lambda c: c.text) + assert [c.text for c in result] == [ + 'orders', + 'public', + '"select"', + 'set_returning_func', + 'user_emails', + 'users' + ] def test_auto_escaped_col_names(completer, complete_event): text = 'SELECT from "select"' -- cgit v1.2.3