summaryrefslogtreecommitdiffstats
path: root/tests/test_smart_completion_public_schema_only.py
diff options
context:
space:
mode:
authorJoakim Koljonen <koljonen@outlook.com>2017-03-05 22:08:03 +0100
committerJoakim Koljonen <koljonen@outlook.com>2017-03-15 02:56:29 +0100
commit8c487c7d7837910f7f2c8aa52de33ee86ebd8c42 (patch)
tree506526292d1b31f2eff9da1cd7b936db4bad51f8 /tests/test_smart_completion_public_schema_only.py
parent3f51a6e5969e2c6902d408e0b44246eb2e0a72ea (diff)
Deduplicate tests: Change len('...') to len(text)
This is to simplify the next commit.
Diffstat (limited to 'tests/test_smart_completion_public_schema_only.py')
-rw-r--r--tests/test_smart_completion_public_schema_only.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py
index 90c554c9..6260403a 100644
--- a/tests/test_smart_completion_public_schema_only.py
+++ b/tests/test_smart_completion_public_schema_only.py
@@ -76,8 +76,8 @@ def test_empty_string_completion(completer, complete_event):
@parametrize('completer', completers())
def test_select_keyword_completion(completer, complete_event):
- text = 'SEL'
- position = len('SEL')
+ text = ('SEL')
+ position = len(text)
result = completer.get_completions(
Document(text=text, cursor_position=position),
complete_event)
@@ -86,8 +86,8 @@ def test_select_keyword_completion(completer, complete_event):
@parametrize('completer', completers())
def test_builtin_function_name_completion(completer, complete_event):
- text = 'SELECT MA'
- position = len('SELECT MA')
+ text = ('SELECT MA')
+ position = len(text)
result = completer.get_completions(
Document(text=text, cursor_position=position), complete_event)
assert set(result) == set([
@@ -98,8 +98,8 @@ def test_builtin_function_name_completion(completer, complete_event):
@parametrize('completer', completers())
def test_builtin_function_matches_only_at_start(completer, complete_event):
- text = 'SELECT IN'
- position = len('SELECT IN')
+ text = ('SELECT IN')
+ position = len(text)
document = Document(text=text, cursor_position=position)
result = [c.text for c in
@@ -110,8 +110,8 @@ def test_builtin_function_matches_only_at_start(completer, complete_event):
@parametrize('completer', completers(casing=False, alias=False))
def test_user_function_name_completion(completer, complete_event):
- text = 'SELECT cu'
- position = len('SELECT cu')
+ text = ('SELECT cu')
+ position = len(text)
result = completer.get_completions(
Document(text=text, cursor_position=position), complete_event)
assert set(result) == set([
@@ -126,8 +126,8 @@ def test_user_function_name_completion(completer, complete_event):
@parametrize('completer', completers(casing=False, alias=False))
def test_user_function_name_completion_matches_anywhere(completer,
complete_event):
- text = 'SELECT om'
- position = len('SELECT om')
+ text = ('SELECT om')
+ position = len(text)
result = completer.get_completions(
Document(text=text, cursor_position=position), complete_event)
assert set(result) == set([