33import pytest
44
55import narwhals .stable .v1 as nw
6+ from tests .utils import DUCKDB_VERSION
67from tests .utils import PANDAS_VERSION
78from tests .utils import POLARS_VERSION
89from tests .utils import PYARROW_VERSION
@@ -53,9 +54,6 @@ def test_lazy_cum_max_grouped(
5354 reverse : bool ,
5455 expected_a : list [int ],
5556) -> None :
56- if "duckdb" in str (constructor ):
57- # no window function support yet in duckdb
58- request .applymarker (pytest .mark .xfail )
5957 if "pyarrow_table" in str (constructor ):
6058 # grouped window functions not yet supported
6159 request .applymarker (pytest .mark .xfail )
@@ -64,7 +62,9 @@ def test_lazy_cum_max_grouped(
6462 if "dask" in str (constructor ):
6563 # https://github.com/dask/dask/issues/11806
6664 request .applymarker (pytest .mark .xfail )
67- if "polars" in str (constructor ) and POLARS_VERSION < (1 , 9 ):
65+ if ("polars" in str (constructor ) and POLARS_VERSION < (1 , 9 )) or (
66+ "duckdb" in str (constructor ) and DUCKDB_VERSION < (1 , 3 )
67+ ):
6868 pytest .skip (reason = "too old version" )
6969 if "cudf" in str (constructor ):
7070 # https://github.com/rapidsai/cudf/issues/18159
@@ -101,9 +101,6 @@ def test_lazy_cum_max_ordered_by_nulls(
101101 reverse : bool ,
102102 expected_a : list [int ],
103103) -> None :
104- if "duckdb" in str (constructor ):
105- # no window function support yet in duckdb
106- request .applymarker (pytest .mark .xfail )
107104 if "pyarrow_table" in str (constructor ):
108105 # grouped window functions not yet supported
109106 request .applymarker (pytest .mark .xfail )
@@ -112,7 +109,9 @@ def test_lazy_cum_max_ordered_by_nulls(
112109 if "dask" in str (constructor ):
113110 # https://github.com/dask/dask/issues/11806
114111 request .applymarker (pytest .mark .xfail )
115- if "polars" in str (constructor ) and POLARS_VERSION < (1 , 9 ):
112+ if ("polars" in str (constructor ) and POLARS_VERSION < (1 , 9 )) or (
113+ "duckdb" in str (constructor ) and DUCKDB_VERSION < (1 , 3 )
114+ ):
116115 pytest .skip (reason = "too old version" )
117116 if "cudf" in str (constructor ):
118117 # https://github.com/rapidsai/cudf/issues/18159
@@ -153,15 +152,14 @@ def test_lazy_cum_max_ungrouped(
153152 reverse : bool ,
154153 expected_a : list [int ],
155154) -> None :
156- if "duckdb" in str (constructor ):
157- # no window function support yet in duckdb
158- request .applymarker (pytest .mark .xfail )
159155 if "dask" in str (constructor ) and reverse :
160156 # https://github.com/dask/dask/issues/11802
161157 request .applymarker (pytest .mark .xfail )
162158 if "modin" in str (constructor ):
163159 pytest .skip (reason = "probably bugged" )
164- if "polars" in str (constructor ) and POLARS_VERSION < (1 , 9 ):
160+ if ("polars" in str (constructor ) and POLARS_VERSION < (1 , 9 )) or (
161+ "duckdb" in str (constructor ) and DUCKDB_VERSION < (1 , 3 )
162+ ):
165163 pytest .skip (reason = "too old version" )
166164 if PYARROW_VERSION < (13 , 0 , 0 ) and "pyarrow_table" in str (constructor ):
167165 request .applymarker (pytest .mark .xfail )
@@ -196,15 +194,14 @@ def test_lazy_cum_max_ungrouped_ordered_by_nulls(
196194 reverse : bool ,
197195 expected_a : list [int ],
198196) -> None :
199- if "duckdb" in str (constructor ):
200- # no window function support yet in duckdb
201- request .applymarker (pytest .mark .xfail )
202197 if "dask" in str (constructor ):
203198 # https://github.com/dask/dask/issues/11806
204199 request .applymarker (pytest .mark .xfail )
205200 if "modin" in str (constructor ):
206201 pytest .skip (reason = "probably bugged" )
207- if "polars" in str (constructor ) and POLARS_VERSION < (1 , 9 ):
202+ if ("polars" in str (constructor ) and POLARS_VERSION < (1 , 9 )) or (
203+ "duckdb" in str (constructor ) and DUCKDB_VERSION < (1 , 3 )
204+ ):
208205 pytest .skip (reason = "too old version" )
209206 if PYARROW_VERSION < (13 , 0 , 0 ) and "pyarrow_table" in str (constructor ):
210207 request .applymarker (pytest .mark .xfail )
0 commit comments