Skip to content

Commit

Permalink
Skip torch test on Python 3.13 / Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jan 5, 2025
1 parent c3a4227 commit d07df04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion py-polars/requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# (installable via `make requirements-all`)
# -------------------------------------------------------
--extra-index-url https://download.pytorch.org/whl/cpu
torch
torch; python_version < '3.13' or platform_system != 'Windows' # torch provides no wheel for Python 3.13 on Windows
jax[cpu]
pyiceberg>=0.5.0
9 changes: 8 additions & 1 deletion py-polars/tests/unit/ml/test_to_torch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import sys
from typing import Any

import pytest
Expand All @@ -12,7 +13,13 @@
# ensures the tests aren't run locally; this avoids premature local import)
torch, _ = _lazy_import("torch")

pytestmark = pytest.mark.ci_only
pytestmark = [
pytest.mark.ci_only,
pytest.mark.skipif(
sys.platform == "win32" and sys.version_info >= (3, 13),
reason="Torch does not ship wheels for Python 3.13 on Windows",
),
]


@pytest.fixture
Expand Down

0 comments on commit d07df04

Please sign in to comment.