Skip to content

Commit 1d7f604

Browse files
committed
chore: move duckdb sqlite import test to code instead of ci
1 parent 07a31c6 commit 1d7f604

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

.github/workflows/ibis-main.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,24 +107,6 @@ jobs:
107107
flags: core,${{ runner.os }},python-${{ steps.install_python.outputs.python-version }}
108108
token: ${{ secrets.CODECOV_TOKEN }}
109109

110-
test_duckdb_sqlite3_import:
111-
name: Test sqlite3 and duckdb import
112-
runs-on: ubuntu-latest
113-
steps:
114-
- name: checkout
115-
uses: actions/checkout@v5
116-
117-
- name: install python
118-
uses: actions/setup-python@v6
119-
with:
120-
python-version: "3.13"
121-
122-
- name: install uv
123-
uses: astral-sh/[email protected]
124-
125-
- name: check duckdb doesn't import sqlite3
126-
run: uv run --extra duckdb python -c 'import sys, ibis; assert "sqlite3" not in sys.modules; ibis.duckdb.connect(); assert "sqlite3" not in sys.modules'
127-
128110
test_scrapy_import:
129111
name: Test import with twisted
130112
runs-on: ubuntu-latest

ibis/backends/duckdb/tests/test_client.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,3 +518,16 @@ def test_basic_enum_schema_inference(con, converter):
518518
t = con.table(name)
519519
assert t.e.type() == dt.string
520520
assert set(converter(t.e)) == {"a", "b"}
521+
522+
523+
@pytest.mark.parametrize(
524+
"line", ["", """ibis.duckdb.connect()"""], ids=["none", "duckdb"]
525+
)
526+
def test_duckdb_doesnt_import_sqlite(line):
527+
code = f"""\
528+
import sys
529+
import ibis
530+
531+
{line}
532+
assert "sqlite3" not in sys.modules"""
533+
subprocess.run([sys.executable, "-c", code], check=True)

0 commit comments

Comments
 (0)