Skip to content

Commit

Permalink
chore: clean up errors a bit in duplicate schema test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Aug 3, 2024
1 parent 5a7caef commit d8f8c5c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion ibis/backends/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import ibis.expr.operations as ops
from ibis.backends.conftest import ALL_BACKENDS
from ibis.backends.tests.errors import (
ClickHouseDatabaseError,
ExaQueryError,
ImpalaHiveServer2Error,
OracleDatabaseError,
Expand Down Expand Up @@ -1631,6 +1632,16 @@ def test_from_connection(con, top_level):
assert result == 1


@pytest.mark.never(
["postgres"],
raises=com.UnsupportedOperationError,
reason="tables cannot be created in other databases",
)
@pytest.mark.notimpl(
["exasol"],
raises=com.UnsupportedOperationError,
reason="unknown whether tables can be created in other databases",
)
def test_no_accidental_cross_database_table_load(con_create_database):
con = con_create_database

Expand All @@ -1651,7 +1662,11 @@ def test_no_accidental_cross_database_table_load(con_create_database):
con.drop_table(table)

# Now attempting to load same table name without specifying db should fail
with pytest.raises(com.IbisError):
with pytest.raises(
tuple(filter(None, (ClickHouseDatabaseError, com.IbisError)))
# datafusion really needs to get their exception story in order
+ (Exception,) * (con.name == "datafusion")
):
t = con.table(table)

# But can load if specify other db
Expand Down

0 comments on commit d8f8c5c

Please sign in to comment.