| name | run-tests |
| description | Run pytest with parallel execution and coverage. Use when running tests, verifying changes, or the user says "run tests", "test", or "pytest". |
Run Tests
Vendored from steward (canonical upstream: docs/skill-sources.md); this copy is owned by lobes and may diverge.
Run the project's pytest suite with optional parallelism (pytest-xdist) and coverage.
Coverage targets are read from pyproject.toml's [tool.coverage.run] section,
so the same script works in any sibling repo without modification.
Usage
bash .claude/skills/run-tests/scripts/test.sh -p
bash .claude/skills/run-tests/scripts/test.sh -p -q
bash .claude/skills/run-tests/scripts/test.sh --ci
bash .claude/skills/run-tests/scripts/test.sh -p tests/test_socket_server.py
bash .claude/skills/run-tests/scripts/test.sh tests/test_rooms.py
bash .claude/skills/run-tests/scripts/test.sh -p -c
Options
| Flag | Short | Description |
|---|
--parallel | -p | Run with -n auto (pytest-xdist, uses all CPU cores) |
--coverage | -c | Enable coverage reporting to terminal |
--ci | | Full CI mode: parallel + coverage + XML report + verbose |
--quick | -q | Quiet output (no verbose, no coverage) |
Extra arguments are passed through to pytest (e.g., -x for stop-on-first-failure, -k "pattern" for filtering).
When to Use Which Mode
- After code changes:
bash test.sh -p — fast parallel run, verbose output
- Quick sanity check:
bash test.sh -p -q — minimal output
- Before PR / release:
bash test.sh --ci — matches CI exactly
- Debugging flaky test:
bash test.sh tests/test_flaky.py — sequential, single file