Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 62a2605

Browse files
committed
Small improvement to tests
1 parent 04ab11b commit 62a2605

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

tests/test_database.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_current_timestamp(self):
8686
class TestThreePartIds(unittest.TestCase):
8787
def test_three_part_support(self):
8888
if self.db_cls not in [dbs.PostgreSQL, dbs.Redshift, dbs.Snowflake]:
89-
self.skipTest('Limited support for 3 part ids')
89+
self.skipTest("Limited support for 3 part ids")
9090

9191
table_name = "tbl_" + random_table_suffix()
9292
db = get_conn(self.db_cls)
@@ -99,11 +99,8 @@ def test_three_part_support(self):
9999
table_two_part = table((schema_name, table_name), schema={"id": int})
100100
table_three_part = table((db_name, schema_name, table_name), schema={"id": int})
101101

102-
db.query(table_one_part.create())
103-
db.query(table_one_part.drop())
104-
105-
db.query(table_two_part.create())
106-
db.query(table_two_part.drop())
107-
108-
db.query(table_three_part.create())
109-
db.query(table_three_part.drop())
102+
for part in (table_one_part, table_two_part, table_three_part):
103+
db.query(part.create())
104+
d = db.query_table_schema(part.path)
105+
assert len(d) == 1
106+
db.query(part.drop())

0 commit comments

Comments
 (0)