From 7445bbcc42005639b8aa4c9ec510473a1e4aafba Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Wed, 4 Jun 2025 21:23:04 +0200 Subject: [PATCH] Revert GH changes, don't run snapshot tests on Windows --- .github/workflows/pytest.yml | 8 +++++++- pyproject.toml | 1 + test/serena/test_symbol_editing.py | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index e975610..6d28afc 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -55,5 +55,11 @@ jobs: run: uv pip install -e ".[dev]" - name: Test with pytest shell: bash + # Currently, java and rust seem to cause problems in CI, and snapshot tests seem to cause problems on Windows + # probably due to the way the language servers are started and stopped run: | - uv run pytest + if [[ "$RUNNER_OS" == "Windows" ]]; then + uv run pytest -m "not java and not rust and not snapshot" + else + uv run pytest -m "not java and not rust" + fi diff --git a/pyproject.toml b/pyproject.toml index d865d89..3ce1ed4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,4 +258,5 @@ markers = [ "rust: language server running for Rust", "typescript: language server running for TypeScript", "php: language server running for PHP", + "snapshot: snapshot tests", ] diff --git a/test/serena/test_symbol_editing.py b/test/serena/test_symbol_editing.py index 6b86fe8..c569db5 100644 --- a/test/serena/test_symbol_editing.py +++ b/test/serena/test_symbol_editing.py @@ -14,6 +14,8 @@ from serena.symbol import CodeDiff from src.serena.symbol import SymbolManager from test.conftest import create_ls, get_repo_path +pytestmark = pytest.mark.snapshot + class EditingTest: def __init__(self, language: Language, rel_path: str): @@ -61,7 +63,7 @@ class EditingTest: def _apply_edit(self, symbol_manager: SymbolManager) -> None: pass - def _test_diff(self, code_diff: CodeDiff, snapshot) -> None: + def _test_diff(self, code_diff: CodeDiff, snapshot: str) -> None: assert code_diff.modified_content == snapshot