Skip to content

Commit

Permalink
test(backends): copy from_connection to new file
Browse files Browse the repository at this point in the history
  • Loading branch information
deepyaman committed Jul 20, 2024
1 parent 6a439b5 commit dfabfb3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ibis/backends/tests/test_dbapi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from __future__ import annotations

import pytest

CON_ATTR = {"flink": "_table_env", "pyspark": "_session"}
DEFAULT_CON_ATTR = "con"


@pytest.mark.never(["dask", "pandas", "polars"], reason="don't have connection concept")
def test_from_connection(con):
new_con = type(con).from_connection(getattr(con, CON_ATTR.get(con.name, "con")))
assert {"astronauts", "batting", "diamonds"} <= set(new_con.list_tables())

0 comments on commit dfabfb3

Please sign in to comment.