Skip to content

fix(testing): accept pytest flags without explicit separator - #42204

Open
xushun007 wants to merge 2 commits into
NousResearch:mainfrom
xushun007:fix/run-tests-passthrough
Open

fix(testing): accept pytest flags without explicit separator#42204
xushun007 wants to merge 2 commits into
NousResearch:mainfrom
xushun007:fix/run-tests-passthrough

Conversation

@xushun007

Copy link
Copy Markdown

Fixes #42189

Summary

Teach the per-file test runner to accept pytest passthrough flags even when the caller omits the explicit -- separator.

This preserves the documented -- behavior while also supporting the common shorthand:

scripts/run_tests.sh tests/test_run_tests_parallel.py -q

## What changed

- added _split_runner_and_pytest_args() to preserve explicit -- handling
- fall back to parse_known_args() when no separator is present
- added regression tests for both separatorless and explicit-separator forms

## Validation

- ./.venv/bin/python -m pytest tests/test_run_tests_parallel.py -q -o addopts=
- scripts/run_tests.sh tests/test_run_tests_parallel.py -q -o addopts=

xushun007 added 2 commits June 8, 2026 22:55
…x fallback

Add two new error-classification functions to agent/auxiliary_client.py:

- _is_server_error(exc): catches HTTP 500-504 + gRPC UNAVAILABLE
- _is_unavailable_error(exc): catches 503 + 'unavailable'/'overloaded' text

Both are added to should_fallback and is_capacity_error in both
sync (call_llm) and async (async_call_llm) paths, so 5xx proxy/gateway
errors trigger provider fallback instead of failing through to the
generic handler.

Closes NousResearch#42088
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 8, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for addressing the test-runner ergonomics.

Problems

Suggested changes

Automated hermes-sweeper review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: scripts/run_tests.sh rejects pytest flags passed without --

3 participants