Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Use a Windows-launchable gh fixture in workspace lifecycle test

justrach2b3441613ab0
diff --git a/scripts/test-workspace-lifecycle.py b/scripts/test-workspace-lifecycle.py
index 124b9d78..9c6be05a 100644
--- a/scripts/test-workspace-lifecycle.py
+++ b/scripts/test-workspace-lifecycle.py
@@ -16,9 +16,12 @@ with tempfile.TemporaryDirectory(prefix="graff-workspace-lifecycle-") as tempora
fixtures.mkdir()
proof = Path(temporary) / "proof.json"
proof.write_text("{}")
- gh = fixtures / "gh"
- gh.write_text("#!/bin/sh\ncat \"$GRAFF_TEST_PR_PROOF\"\n")
- gh.chmod(0o755)
+ gh = fixtures / ("gh.cmd" if os.name == "nt" else "gh")
+ if os.name == "nt":
+ gh.write_text('@echo off\ntype "%GRAFF_TEST_PR_PROOF%"\n')
+ else:
+ gh.write_text("#!/bin/sh\ncat \"$GRAFF_TEST_PR_PROOF\"\n")
+ gh.chmod(0o755)
env.update(PATH=f"{fixtures}{os.pathsep}{env['PATH']}", GRAFF_TEST_PR_PROOF=str(proof))
def git(*args, cwd=root):