docs(contributing): recommend scripts/run_tests.sh over direct pytest - #44482
Closed
sakakibara-yuuki wants to merge 1 commit into
Closed
docs(contributing): recommend scripts/run_tests.sh over direct pytest#44482sakakibara-yuuki wants to merge 1 commit into
sakakibara-yuuki wants to merge 1 commit into
Conversation
The website contributing guide still tells contributors to run
`pytest tests/ -v`, but the test suite relies on per-file process
isolation (see tests/conftest.py): several fixtures evict hermes_cli*
modules from sys.modules, so a monolithic pytest run lets later test
files' monkeypatches land on re-imported module objects and miss,
leaking real network calls that hang in getaddrinfo until
pytest-timeout fires.
CONTRIBUTING.md and AGENTS.md were already updated to point at
scripts/run_tests.sh ("ALWAYS use scripts/run_tests.sh — do not call
pytest directly"); this brings the website doc in line.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the contributing guide to standardize test execution via the repository’s test runner script instead of invoking pytest directly.
Changes:
- Replace the documented test command in “Run Tests” with
scripts/run_tests.sh - Replace the “Before Submitting” checklist test command with
scripts/run_tests.sh
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ```bash | ||
| pytest tests/ -v | ||
| scripts/run_tests.sh |
| ### Before Submitting | ||
|
|
||
| 1. **Run tests**: `pytest tests/ -v` | ||
| 1. **Run tests**: `scripts/run_tests.sh` |
Contributor
|
Thanks for identifying the contributor-documentation mismatch. This is an automated hermes-sweeper review; current
Closing as implemented on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replace
pytest tests/ -vwithscripts/run_tests.shin the website contributing guide (website/docs/developer-guide/contributing.md, both the "Run Tests" section and the "Before Submitting" checklist).Why
The published docs page (https://hermes-agent.nousresearch.com/docs/developer-guide/contributing#run-tests) still tells contributors to run
pytest tests/directly, but the repo's own guidance has since moved on:AGENTS.md: "ALWAYS usescripts/run_tests.sh— do not callpytestdirectly."CONTRIBUTING.md: listsscripts/run_tests.shas the preferred, CI-matching runner.tests/conftest.py: documents that the suite relies on per-file process isolation provided byscripts/run_tests_parallel.py.Following the website instructions as written actually breaks: several fixtures evict
hermes_cli*modules fromsys.modules(e.g.tests/hermes_cli/test_kanban_*.py), so in a monolithicpytest tests/run, later test files'monkeypatch.setattrcalls land on re-imported module objects and silently miss. Mocked network calls then escape for real and hang insocket.getaddrinfountil pytest-timeout fires. Reproducible with just two files:pytest tests/hermes_cli/test_kanban_default_assignee.py tests/hermes_cli/test_nous_account.py # -> test_expired_jwt_falls_back_to_fresh_account times out in getaddrinfoSame class of order-dependent
sys.modulespoisoning as #33079, but hitting anyone who follows the published docs.How to test
Docs-only change;
scripts/run_tests.shis the existing canonical runner documented inAGENTS.mdandCONTRIBUTING.md.