Skip to content

Commit

Permalink
test(duckdb): test against bugfix release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Sep 25, 2024
1 parent d3496fd commit 9d87788
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 61 deletions.
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 @@ def test_geospatial_start_point(lines, lines_gdf):
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
23 changes: 12 additions & 11 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 All @@ -167,12 +167,13 @@ def test_keyed_asof_join_with_tolerance(
by="key",
tolerance=pd.Timedelta("2D"),
direction=direction,
)
).assign(time=lambda df: df.time.astype("datetime64[us]"))

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):
Expand Down
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

0 comments on commit 9d87788

Please sign in to comment.