summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkoljonen <koljonen@outlook.com>2016-05-15 20:29:48 +0200
committerkoljonen <koljonen@outlook.com>2016-05-15 20:29:48 +0200
commitef9908495497df997e22948b52a694f97b8741d7 (patch)
treede368832b520037fd687369511c1dd2d9976cb42
parent926004eeddeebbb9c0a3bed1dd210059e82b1df8 (diff)
Remove new test I added and edit the existing ones to cover the same case instead
As suggested by darikg
-rw-r--r--tests/test_smart_completion_multiple_schemata.py10
-rw-r--r--tests/test_smart_completion_public_schema_only.py14
2 files changed, 11 insertions, 13 deletions
diff --git a/tests/test_smart_completion_multiple_schemata.py b/tests/test_smart_completion_multiple_schemata.py
index 4b889658..1881110a 100644
--- a/tests/test_smart_completion_multiple_schemata.py
+++ b/tests/test_smart_completion_multiple_schemata.py
@@ -322,12 +322,4 @@ def test_suggest_columns_from_aliased_set_returning_function(completer, complete
result = completer.get_completions(Document(text=sql, cursor_position=pos),
complete_event)
assert set(result) == set([
- Completion(text='x', start_position=0, display_meta='column')])
-
-def test_using(completer, complete_event):
- sql = 'select * from public.users join custom.shipments using('
- pos = len(sql)
- result = completer.get_completions(Document(text=sql, cursor_position=pos),
- complete_event)
- assert set(result) == set([
- Completion(text='id', start_position=0, display_meta='column')])
+ Completion(text='x', start_position=0, display_meta='column')]) \ No newline at end of file
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py
index 36ca6203..19641af5 100644
--- a/tests/test_smart_completion_public_schema_only.py
+++ b/tests/test_smart_completion_public_schema_only.py
@@ -344,8 +344,11 @@ def test_suggested_tables_after_on_right_side(completer, complete_event):
Completion(text='users', start_position=0, display_meta='table alias'),
Completion(text='orders', start_position=0, display_meta='table alias')])
-def test_join_using_suggests_common_columns(completer, complete_event):
- text = 'SELECT * FROM users INNER JOIN orders USING ('
+@pytest.mark.parametrize('text', [
+ 'SELECT * FROM users INNER JOIN orders USING (',
+ 'SELECT * FROM users INNER JOIN orders USING(',
+])
+def test_join_using_suggests_common_columns(completer, complete_event, text):
pos = len(text)
result = set(completer.get_completions(
Document(text=text, cursor_position=pos), complete_event))
@@ -354,8 +357,11 @@ def test_join_using_suggests_common_columns(completer, complete_event):
Completion(text='email', start_position=0, display_meta='column'),
])
-def test_join_using_suggests_columns_after_first_column(completer, complete_event):
- text = 'SELECT * FROM users INNER JOIN orders USING (id,'
+@pytest.mark.parametrize('text', [
+ 'SELECT * FROM users INNER JOIN orders USING (id,',
+ 'SELECT * FROM users INNER JOIN orders USING(id,',
+])
+def test_join_using_suggests_columns_after_first_column(completer, complete_event, text):
pos = len(text)
result = set(completer.get_completions(
Document(text=text, cursor_position=pos), complete_event))