Skip to content

Commit

Permalink
chore: fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
ncclementi committed Sep 24, 2024
1 parent b844319 commit 0985de1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ibis/backends/datafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def do_connect(
... "diamonds": "ci/ibis-testing-data/csv/diamonds.csv",
... }
>>> con = ibis.datafusion.connect(config)
>>> con.list_tables()
>>> con.tables()
['astronauts', 'diamonds']
>>> con.table("diamonds")
DatabaseTable: diamonds
Expand Down
4 changes: 2 additions & 2 deletions ibis/backends/duckdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,10 +1286,10 @@ def attach_sqlite(
... ) # doctest: +ELLIPSIS
<...>
>>> con = ibis.connect("duckdb://")
>>> con.list_tables()
>>> con.tables()
[]
>>> con.attach_sqlite("/tmp/attach_sqlite.db")
>>> con.list_tables()
>>> con.tables()
['t']
"""
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/mysql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def do_connect(
>>> password = os.environ.get("IBIS_TEST_MYSQL_PASSWORD", "ibis")
>>> database = os.environ.get("IBIS_TEST_MYSQL_DATABASE", "ibis_testing")
>>> con = ibis.mysql.connect(database=database, host=host, user=user, password=password)
>>> con.list_tables() # doctest: +ELLIPSIS
>>> con.tables() # doctest: +ELLIPSIS
[...]
>>> t = con.table("functional_alltypes")
>>> t
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/postgres/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def do_connect(
>>> password = os.environ.get("IBIS_TEST_POSTGRES_PASSWORD", "postgres")
>>> database = os.environ.get("IBIS_TEST_POSTGRES_DATABASE", "ibis_testing")
>>> con = ibis.postgres.connect(database=database, host=host, user=user, password=password)
>>> con.list_tables() # doctest: +ELLIPSIS
>>> con.tables() # doctest: +ELLIPSIS
[...]
>>> t = con.table("functional_alltypes")
>>> t
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/sqlite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def attach(self, name: str, path: str | Path) -> None:
>>> con1 = ibis.sqlite.connect("/tmp/original.db")
>>> con2 = ibis.sqlite.connect("/tmp/new.db")
>>> con1.attach("new", "/tmp/new.db")
>>> con1.list_tables(database="new")
>>> con1.tables(database="new")
[]
"""
with self.begin() as cur:
Expand Down

0 comments on commit 0985de1

Please sign in to comment.