Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(duckdb): test against bugfix release 1.1.1 #10222

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ibis/backends/duckdb/tests/test_geospatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import ibis
from ibis.conftest import LINUX, MACOS, SANDBOXED

duckdb = pytest.importorskip("duckdb")

Check warning on line 15 in ibis/backends/duckdb/tests/test_geospatial.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/duckdb/tests/test_geospatial.py#L15

Added line #L15 was not covered by tests
gpd = pytest.importorskip("geopandas")
gtm = pytest.importorskip("geopandas.testing")
shapely = pytest.importorskip("shapely")
Expand Down Expand Up @@ -185,8 +186,11 @@
methodcaller("union_all"),
marks=pytest.mark.xfail(
condition=(
vparse(gpd.__version__) < vparse("1")
or vparse(shapely.__version__) >= vparse("2.0.5")
vparse(duckdb.__version__) < vparse("1.1.1")
and (
vparse(gpd.__version__) < vparse("1")
or vparse(shapely.__version__) >= vparse("2.0.5")
)
),
raises=(AttributeError, AssertionError),
reason="union_all doesn't exist; shapely 2.0.5 results in a different value for union_all",
Expand Down
33 changes: 18 additions & 15 deletions ibis/backends/tests/test_asof_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,24 @@ def test_asof_join(con, time_left, time_right, time_df1, time_df2, direction, op
)
@pytest.mark.notyet(
[
"bigquery",
"datafusion",
"trino",
"postgres",
"mysql",
"pyspark",
"druid",
"impala",
"bigquery",
"exasol",
"oracle",
"flink",
"impala",
"mssql",
"sqlite",
"mysql",
"oracle",
"postgres",
"pyspark",
"risingwave",
"flink",
"sqlite",
"trino",
]
)
@pytest.mark.xfail_version(
duckdb=["duckdb>=0.10.2"], raises=DuckDBInvalidInputException
duckdb=["duckdb>=0.10.2,<1.1.1"], raises=DuckDBInvalidInputException
)
def test_keyed_asof_join_with_tolerance(
con,
Expand Down Expand Up @@ -172,8 +172,11 @@ def test_keyed_asof_join_with_tolerance(
result = result.sort_values(["key", "time"]).reset_index(drop=True)
expected = expected.sort_values(["key", "time"]).reset_index(drop=True)

tm.assert_frame_equal(result[expected.columns], expected)
with pytest.raises(AssertionError):
tm.assert_series_equal(result["time"], result["time_right"])
with pytest.raises(AssertionError):
tm.assert_series_equal(result["key"], result["key_right"])
tm.assert_frame_equal(
# drop `time` from comparison to avoid issues with different time resolution
result[expected.columns].drop(["time"], axis=1),
expected.drop(["time"], axis=1),
)

# check that time is equal in value, if not dtype
tm.assert_series_equal(result["time"], expected["time"], check_dtype=False)
100 changes: 53 additions & 47 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ defusedxml==0.7.1 ; python_version >= "3.10" and python_version < "3.13"
deltalake==0.20.0 ; python_version >= "3.10" and python_version < "4.0"
distlib==0.3.8 ; python_version >= "3.10" and python_version < "4.0"
doit==0.36.0 ; python_version >= "3.10" and python_version < "3.13"
duckdb==1.1.0 ; python_version >= "3.10" and python_version < "4.0"
duckdb==1.1.1 ; python_version >= "3.10" and python_version < "4.0"
dulwich==0.21.7 ; python_version >= "3.10" and python_version < "4.0"
dunamai==1.22.0 ; python_version >= "3.10" and python_version < "4.0"
exceptiongroup==1.2.2 ; python_version >= "3.10" and python_version < "3.11"
Expand Down