Skip to content

Commit 7de4919

Browse files
committed
fixup
1 parent 28a6b98 commit 7de4919

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

tests/conftest.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
): # pragma: no cover
3434
DEFAULT_CONSTRUCTORS = default_constructors
3535
else:
36-
DEFAULT_CONSTRUCTORS = (
37-
"pandas,pandas[nullable],pandas[pyarrow],polars[eager],polars[lazy],pyarrow"
38-
)
36+
DEFAULT_CONSTRUCTORS = "pandas,pandas[pyarrow],polars[eager],pyarrow,duckdb,sqlframe"
3937

4038

4139
def pytest_addoption(parser: Any) -> None:
@@ -232,24 +230,27 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None:
232230

233231
for constructor in selected_constructors:
234232
if (
235-
constructor in {"pandas[nullable]", "pandas[pyarrow]"}
236-
and MIN_PANDAS_NULLABLE_VERSION > PANDAS_VERSION
237-
) or (constructor == "sqlframe" and sys.version_info < (3, 9)):
238-
continue # pragma: no cover
239-
if constructor == "pyspark" and sys.version_info >= (3, 12):
233+
(
234+
constructor in {"pandas[nullable]", "pandas[pyarrow]"}
235+
and MIN_PANDAS_NULLABLE_VERSION > PANDAS_VERSION
236+
)
237+
or (constructor == "sqlframe" and sys.version_info < (3, 9))
238+
or (constructor == "pyspark" and sys.version_info >= (3, 12))
239+
):
240240
continue # pragma: no cover
241241

242242
if constructor in EAGER_CONSTRUCTORS:
243243
eager_constructors.append(EAGER_CONSTRUCTORS[constructor])
244244
eager_constructors_ids.append(constructor)
245245
constructors.append(EAGER_CONSTRUCTORS[constructor])
246-
constructors_ids.append(constructor)
246+
elif constructor == "pyspark":
247+
constructors.append(pyspark_lazy_constructor())
247248
elif constructor in LAZY_CONSTRUCTORS:
248249
constructors.append(LAZY_CONSTRUCTORS[constructor])
249-
constructors_ids.append(constructor)
250250
else: # pragma: no cover
251251
msg = f"Expected one of {EAGER_CONSTRUCTORS.keys()} or {LAZY_CONSTRUCTORS.keys()}, got {constructor}"
252252
raise ValueError(msg)
253+
constructors_ids.append(constructor)
253254

254255
if "constructor_eager" in metafunc.fixturenames:
255256
metafunc.parametrize(

tests/translate/from_native_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import sys
34
from contextlib import nullcontext as does_not_raise
45
from typing import TYPE_CHECKING
56
from typing import Any
@@ -254,6 +255,7 @@ def test_series_only_sqlframe() -> None: # pragma: no cover
254255
(True, pytest.raises(TypeError, match="Cannot only use `eager_only`")),
255256
],
256257
)
258+
@pytest.mark.skipif(sys.version_info < (3, 9), reason="too old for sqlframe")
257259
def test_eager_only_sqlframe(eager_only: Any, context: Any) -> None: # pragma: no cover
258260
pytest.importorskip("sqlframe")
259261
from sqlframe.duckdb import DuckDBSession

0 commit comments

Comments
 (0)