Skip to content
Open
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
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ typing: ## Run typing checks
--editable test-plugin/. \
--editable . \
--group typing
# temporary pin due to https://github.com/narwhals-dev/narwhals/issues/3560
$(VENV_BIN)/uv pip install "pyarrow<24"
$(VENV_BIN)/uv run --no-sync pyright
$(VENV_BIN)/uv run --no-sync mypy

Expand Down
10 changes: 4 additions & 6 deletions tests/expr_and_series/cast_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ def test_cast_datetime_tz_aware(
or "ibis" in str(constructor)
):
request.applymarker(pytest.mark.xfail)
request.applymarker(
pytest.mark.xfail(is_pyarrow_windows_no_tzdata(constructor), reason="no tzdata")
)
Comment on lines -220 to -222
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the "tzdata" thing is pyarrow-version dependent

we're already running these tests on linux

IMO we can just skip, it's not our responsibility to tests whether pyarrow runs the same way on windows and linux

if is_pyarrow_windows_no_tzdata(constructor):
pytest.skip()

data = {
"date": [
Expand Down Expand Up @@ -247,9 +246,8 @@ def test_cast_datetime_utc(
or "sqlframe" in str(constructor)
):
request.applymarker(pytest.mark.xfail)
request.applymarker(
pytest.mark.xfail(is_pyarrow_windows_no_tzdata(constructor), reason="no tzdata")
)
if is_pyarrow_windows_no_tzdata(constructor):
pytest.skip()

data = {
"date": [
Expand Down
6 changes: 2 additions & 4 deletions tests/frame/to_numpy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ def test_to_numpy(constructor_eager: ConstructorEager) -> None:
assert result.dtype == "float64"


def test_to_numpy_tz_aware(
constructor_eager: ConstructorEager, request: pytest.FixtureRequest
) -> None:
def test_to_numpy_tz_aware(constructor_eager: ConstructorEager) -> None:
if ("pandas_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2)) or (
"pyarrow" in str(constructor_eager) and is_windows()
):
request.applymarker(pytest.mark.xfail)
pytest.skip()
df = nw.from_native(
constructor_eager({"a": [datetime(2020, 1, 1), datetime(2020, 1, 2)]}),
eager_only=True,
Expand Down
6 changes: 4 additions & 2 deletions tests/selectors_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,16 @@ def test_datetime(constructor: Constructor, request: pytest.FixtureRequest) -> N
"pyspark" in str(constructor)
or "duckdb" in str(constructor)
or "dask" in str(constructor)
or ("pyarrow" in str(constructor) and is_windows())
or ("pandas" in str(constructor) and PANDAS_VERSION < (2,))
or "ibis" in str(constructor)
# https://github.com/pola-rs/polars/issues/23767
# TODO(FBruzzesi): Manage polars version
or ("polars" in str(constructor) and POLARS_VERSION >= (1, 32, 0))
):
request.applymarker(pytest.mark.xfail)
if ("pyarrow" in str(constructor) and is_windows()) or (
"pandas" in str(constructor) and PANDAS_VERSION < (2,)
):
pytest.skip()
if "modin" in str(constructor):
pytest.skip(reason="too slow")

Expand Down
7 changes: 2 additions & 5 deletions tests/series_only/to_numpy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,13 @@ def test_to_numpy(
assert_array_equal(s.to_numpy(), np.array(data, dtype=float))


def test_to_numpy_tz_aware(
constructor_eager: ConstructorEager, request: pytest.FixtureRequest
) -> None:
def test_to_numpy_tz_aware(constructor_eager: ConstructorEager) -> None:
if (
("pandas_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2))
or ("modin_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2))
or ("pyarrow" in str(constructor_eager) and is_windows())
):
request.applymarker(pytest.mark.xfail)
request.applymarker(pytest.mark.xfail)
pytest.skip()
df = nw.from_native(
constructor_eager({"a": [datetime(2020, 1, 1), datetime(2020, 1, 2)]}),
eager_only=True,
Expand Down
Loading