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