fix(test): support Windows virtualenvs in canonical runner - #63642
fix(test): support Windows virtualenvs in canonical runner#63642lucamoretti09 wants to merge 1 commit into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for addressing native Windows test-runner discovery. The underlying defect is present on current main: scripts/run_tests.sh:42-54 only accepts bin/activate and derives bin/python, so Scripts/python.exe venvs cannot run.
Problems
tests/scripts/test_run_tests_windows_venv.py:10readsrun_tests.shand asserts source strings. This is a banned source-snapshot pattern underAGENTS.md:1358-1411; it does not exercise interpreter resolution or the hermetic environment.website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md:7says the page is generated fromskills/autonomous-ai-agents/hermes-agent/SKILL.md. The PR edits only the generated page, while the source skill still says the wrapper is POSIX-only atskills/autonomous-ai-agents/hermes-agent/SKILL.md:868and:1067.
Suggested changes
- Replace the snapshot test with a behavioral runner test using a temporary fixture and real shell invocation; cover both interpreter layouts.
- Edit the source SKILL.md and regenerate its website page.
This is an automated hermes-sweeper review.
|
|
||
| def test_runner_supports_posix_and_windows_virtualenv_layouts(): | ||
| script = RUNNER.read_text(encoding="utf-8") | ||
|
|
There was a problem hiding this comment.
This test snapshots shell source rather than executing behavior, which AGENTS.md:1358-1411 bans. Please replace it with a behavioral invocation against a temporary fixture/venv so it proves the selected interpreter and clean environment work.
|
|
||
| **`scripts/run_tests.sh` doesn't work as-is on Windows** — it looks for | ||
| POSIX venv layouts (`.venv/bin/activate`). The Hermes-installed venv at | ||
| **`scripts/run_tests.sh` supports native Windows venv layouts** — it probes |
There was a problem hiding this comment.
This page is generated from skills/autonomous-ai-agents/hermes-agent/SKILL.md (its header says so). Please update that source skill and regenerate this page; otherwise the shipped skill continues to say the wrapper is POSIX-only.
What
Makes the canonical
scripts/run_tests.shwork with both virtualenv layouts:.venv/bin/python.venv/Scripts/python.exeIt also checks both
.venvandvenvunder the repository and installed Hermes checkout, and preservesUSERPROFILEplusPYTHONUTF8=1inside the runner's hermeticenv -ienvironment.The bundled Hermes skill documentation is updated to distinguish a supported Windows venv layout from the smaller end-user venv that may intentionally omit pytest.
Verification
2 passed—tests/scripts/test_run_tests_windows_venv.pybash -n scripts/run_tests.shusing Git for Windows Bashgit diff --checkScope
This only changes interpreter discovery and the clean environment. POSIX behavior and test-runner arguments remain unchanged.