Skip to content

Commit

Permalink
chore: fix list tables test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Sep 12, 2024
1 parent 8acdbf1 commit 74a3bd9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
11 changes: 2 additions & 9 deletions ibis/backends/bigquery/tests/system/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,18 +386,11 @@ def test_create_table_with_options(con):
con.drop_table(name)


def test_list_tables_schema_warning_refactor(con):
pypi_tables = [
"external",
"native",
]
def test_list_tables_schema(con):
pypi_tables = ["external", "native"]

assert con.list_tables()

# Warn but succeed for schema list
with pytest.raises(FutureWarning):
assert con.list_tables(schema="pypi") == pypi_tables

assert con.list_tables(database="ibis-gbq.pypi") == pypi_tables
assert con.list_tables(database=("ibis-gbq", "pypi")) == pypi_tables

Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/duckdb/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def test_invalid_connect(tmp_path):
ibis.connect(url)


def test_list_tables_schema_warning_refactor(con):
def test_list_tables(con):
assert {
"astronauts",
"awards_players",
Expand Down
10 changes: 1 addition & 9 deletions ibis/backends/snowflake/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def test_struct_of_json(con):
assert all(value == raw for value in result.to_pylist())


def test_list_tables_schema_warning_refactor(con):
def test_list_tables(con):
assert {
"ASTRONAUTS",
"AWARDS_PLAYERS",
Expand All @@ -373,14 +373,6 @@ def test_list_tables_schema_warning_refactor(con):
"TABLE_STORAGE_METRICS",
]

with pytest.warns(FutureWarning):
assert (
con.list_tables(
database="IBIS_TESTING", schema="INFORMATION_SCHEMA", like="TABLE"
)
== like_table
)

assert (
con.list_tables(database="IBIS_TESTING.INFORMATION_SCHEMA", like="TABLE")
== like_table
Expand Down

0 comments on commit 74a3bd9

Please sign in to comment.