Skip to content
Merged
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
5 changes: 5 additions & 0 deletions test/compile/test_compile_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"""Tests for torch.compile compatibility of value estimation functions."""
from __future__ import annotations

import sys

import pytest
import torch

Expand All @@ -15,7 +17,10 @@
vec_td_lambda_return_estimate,
)

IS_WINDOWS = sys.platform == "win32"


@pytest.mark.skipif(IS_WINDOWS, reason="windows tests do not support compile")
class TestValueFunctionCompile:
"""Test compilation of value estimation functions."""

Expand Down
3 changes: 3 additions & 0 deletions test/test_rb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4610,6 +4610,9 @@ def transform(td):
assert rb._init_writer is None


@pytest.mark.skipif(
_os_is_windows, reason="Windows file locking prevents cleanup tests"
)
class TestLazyMemmapStorageCleanup:
"""Tests for LazyMemmapStorage automatic cleanup functionality."""

Expand Down
15 changes: 14 additions & 1 deletion test/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pytest

_ROOT = Path(__file__).resolve().parents[1]
_IS_WINDOWS = sys.platform == "win32"


def _run(cmd, *, cwd, env=None, timeout=60 * 60) -> str:
Expand Down Expand Up @@ -76,7 +77,19 @@ def _expected_dist_version(base_version: str) -> str:
return f"{base_version}+g{_git(['rev-parse', '--short', 'HEAD'])}"


@pytest.mark.parametrize("editable", [True, False], ids=["editable", "wheel"])
@pytest.mark.parametrize(
"editable",
[
pytest.param(
True,
marks=pytest.mark.skipif(
_IS_WINDOWS, reason="Windows file locking prevents editable re-install"
),
id="editable",
),
pytest.param(False, id="wheel"),
],
)
def test_install_no_deps_has_nonzero_version(editable: bool, tmp_path: Path):
# Requires git checkout.
if not (_ROOT / ".git").exists():
Expand Down
Loading