From fca949c2a10b3d896e521ab7ebd4f3e4a9b5c62d Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 23:20:53 +0000 Subject: [PATCH] Tests: clear FS_BRANCH, which the Onshape workflow sets for fs With it set to main, the branch tests ran as if on main, and seven failed, stopping the workflow before it reached Onshape. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01T4daFKz4qvNwCEYcg38VKS --- tests/conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index b9d0f6f8..229620e7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,8 +1,16 @@ # Collects FeatureScript tests (`*_test.fs`), run with the evaluator in fs_eval import pathlib +import pytest + from fs_eval.pytest_plugin import pytest_collect_file # noqa: F401 + +@pytest.fixture(autouse=True) +def _no_branch_override(monkeypatch): + """The Onshape workflow sets FS_BRANCH for fs, which would put every test on its branch.""" + monkeypatch.delenv("FS_BRANCH", raising=False) + # Tests write files as they're written on Linux and macOS, with "\n" line endings. On Windows, text written without # newline="" gets "\r\n", which fs keeps (it syncs files byte for byte), so every test's fixtures would differ. _write_text = pathlib.Path.write_text