From ccc2aa0be9dd09e0b62df64871a828d073f83037 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 9 Jun 2026 20:45:24 -0400 Subject: [PATCH] test(workspace): verify per-run workspace path and gitignore status --- tests/test_workspace_path_finalize.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/test_workspace_path_finalize.py diff --git a/tests/test_workspace_path_finalize.py b/tests/test_workspace_path_finalize.py new file mode 100644 index 00000000..6e7a4fbe --- /dev/null +++ b/tests/test_workspace_path_finalize.py @@ -0,0 +1,18 @@ +"""Tests for the per-run workspace path (workspace_path_finalize_20260609).""" +import subprocess +from pathlib import Path + + +def test_live_gui_workspace_is_under_tests_artifacts(live_gui_workspace: Path) -> None: + """The live_gui_workspace fixture returns a path under tests/artifacts/.""" + s = str(live_gui_workspace).replace("\\", "/") + assert s.startswith("tests/artifacts/live_gui_workspace_"), f"Expected tests/artifacts/live_gui_workspace_*, got {s}" + + +def test_live_gui_workspace_is_gitignored(live_gui_workspace: Path) -> None: + """The live_gui_workspace path is gitignored (via tests/artifacts/ in .gitignore).""" + result = subprocess.run( + ["git", "check-ignore", str(live_gui_workspace)], + capture_output=True, text=True, cwd="." + ) + assert result.returncode == 0, f"Workspace {live_gui_workspace} is not gitignored. git check-ignore output: {result.stdout!r} {result.stderr!r}"