summaryrefslogtreecommitdiffstats
path: root/tests/test_pgspecial.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:17:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:17:09 +0000
commit76d27bc43d56d7ef3ca0090fb199777888adf7c3 (patch)
treeb6d3d562a0be03d404426bb43aff62174be3dc5e /tests/test_pgspecial.py
parentAdding upstream version 3.1.0. (diff)
downloadpgcli-upstream/3.2.0.tar.xz
pgcli-upstream/3.2.0.zip
Adding upstream version 3.2.0.upstream/3.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/test_pgspecial.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/test_pgspecial.py b/tests/test_pgspecial.py
index eaeaf12..cd99e32 100644
--- a/tests/test_pgspecial.py
+++ b/tests/test_pgspecial.py
@@ -13,12 +13,12 @@ from pgcli.packages.sqlcompletion import (
def test_slash_suggests_special():
suggestions = suggest_type("\\", "\\")
- assert set(suggestions) == set([Special()])
+ assert set(suggestions) == {Special()}
def test_slash_d_suggests_special():
suggestions = suggest_type("\\d", "\\d")
- assert set(suggestions) == set([Special()])
+ assert set(suggestions) == {Special()}
def test_dn_suggests_schemata():
@@ -30,24 +30,24 @@ def test_dn_suggests_schemata():
def test_d_suggests_tables_views_and_schemas():
- suggestions = suggest_type("\d ", "\d ")
- assert set(suggestions) == set([Schema(), Table(schema=None), View(schema=None)])
+ suggestions = suggest_type(r"\d ", r"\d ")
+ assert set(suggestions) == {Schema(), Table(schema=None), View(schema=None)}
- suggestions = suggest_type("\d xxx", "\d xxx")
- assert set(suggestions) == set([Schema(), Table(schema=None), View(schema=None)])
+ suggestions = suggest_type(r"\d xxx", r"\d xxx")
+ assert set(suggestions) == {Schema(), Table(schema=None), View(schema=None)}
def test_d_dot_suggests_schema_qualified_tables_or_views():
- suggestions = suggest_type("\d myschema.", "\d myschema.")
- assert set(suggestions) == set([Table(schema="myschema"), View(schema="myschema")])
+ suggestions = suggest_type(r"\d myschema.", r"\d myschema.")
+ assert set(suggestions) == {Table(schema="myschema"), View(schema="myschema")}
- suggestions = suggest_type("\d myschema.xxx", "\d myschema.xxx")
- assert set(suggestions) == set([Table(schema="myschema"), View(schema="myschema")])
+ suggestions = suggest_type(r"\d myschema.xxx", r"\d myschema.xxx")
+ assert set(suggestions) == {Table(schema="myschema"), View(schema="myschema")}
def test_df_suggests_schema_or_function():
suggestions = suggest_type("\\df xxx", "\\df xxx")
- assert set(suggestions) == set([Function(schema=None, usage="special"), Schema()])
+ assert set(suggestions) == {Function(schema=None, usage="special"), Schema()}
suggestions = suggest_type("\\df myschema.xxx", "\\df myschema.xxx")
assert suggestions == (Function(schema="myschema", usage="special"),)
@@ -63,7 +63,7 @@ def test_leading_whitespace_ok():
def test_dT_suggests_schema_or_datatypes():
text = "\\dT "
suggestions = suggest_type(text, text)
- assert set(suggestions) == set([Schema(), Datatype(schema=None)])
+ assert set(suggestions) == {Schema(), Datatype(schema=None)}
def test_schema_qualified_dT_suggests_datatypes():