Skip to content

Commit

Permalink
test(python/adbc_driver_manager): relax exception message check (#2112)
Browse files Browse the repository at this point in the history
Fixes #2111.
  • Loading branch information
lidavidm authored Sep 2, 2024
1 parent cda3468 commit 062e4d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions ci/conda_env_python.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ importlib-resources
# nodejs is required by pyright
nodejs >=13.0.0
pandas
pyarrow=15.0.2
pyarrow-all
pyright
pytest
setuptools

# For integration testing
# 0.20.3 is broken on conda-forge
polars<=0.20.2
polars
protobuf
python-duckdb
4 changes: 2 additions & 2 deletions docs/source/python/recipe/postgresql_polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
data.write_database("example", uri, engine="adbc", if_table_exists="replace")

#: After creating the table, we can use
#: :external:py:func:`polars.read_database` to fetch the result. Again,
#: :external:py:func:`polars.read_database_uri` to fetch the result. Again,
#: we can just pass the URI and tell Polars to manage ADBC for us.

df = pl.read_database("SELECT * FROM example WHERE ints > 1", uri, engine="adbc")
df = pl.read_database_uri("SELECT * FROM example WHERE ints > 1", uri, engine="adbc")

assert len(df) == 2
4 changes: 2 additions & 2 deletions python/adbc_driver_manager/tests/test_lowlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def test_pycapsule(sqlite):
handle = conn.get_table_schema(catalog=None, db_schema=None, table_name="foo")
assert data.schema == pyarrow.schema(handle)
# ensure consumed schema was marked as such
with pytest.raises(ValueError, match="Cannot import released ArrowSchema"):
with pytest.raises(ValueError):
pyarrow.schema(handle)

# smoke test for the capsule calling release
Expand All @@ -454,7 +454,7 @@ def test_pycapsule(sqlite):
assert result == table

# ensure consumed schema was marked as such
with pytest.raises(ValueError, match="Cannot import released ArrowArrayStream"):
with pytest.raises(ValueError):
pyarrow.table(handle)

# smoke test for the capsule calling release
Expand Down

0 comments on commit 062e4d4

Please sign in to comment.