diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:17:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:17:24 +0000 |
commit | 9b77fda0d4171f68760c070895dc5700cb6d1e0f (patch) | |
tree | 37912945e9d35ef62e5a4a1eb07ac224307e5db6 /tests/test_pgspecial.py | |
parent | Releasing debian version 3.1.0-3. (diff) | |
download | pgcli-9b77fda0d4171f68760c070895dc5700cb6d1e0f.tar.xz pgcli-9b77fda0d4171f68760c070895dc5700cb6d1e0f.zip |
Merging upstream version 3.2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/test_pgspecial.py | 24 |
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(): |