| name | testing |
| description | Run tests and linting for NexRL Python project. |
Testing Skill
Test Suite
python -m pytest tests/ -v --tb=short
python -m pytest tests/unittests/ -v
python -m pytest tests/unittests/test_foo.py -v
python -m pytest tests/ -m unit -v
python -m pytest tests/ -m "not slow" -v
Linting
python -m pylint nexrl/ --rcfile=.pylintrc -rn -sn
python -m mypy nexrl/ --ignore-missing-imports
python tests/lint/check_license_header.py <files>
Formatting Check
python -m black --check nexrl/ tests/
python -m isort --check nexrl/ tests/
python -m black nexrl/ tests/
python -m isort nexrl/ tests/
Pre-commit (all checks)
pre-commit run --all-files
Worktree Usage
When running in a worktree, ensure you're in the worktree directory:
cd "$(git rev-parse --show-toplevel)"
python -m pytest tests/ -v --tb=short
Test Markers
unit — Unit tests
integration — Integration tests
slow — Slow running tests
Notes
- Tests belong in
tests/ only (per .ai-instructions/developing/testing-and-examples.md)
- Never create temporary test files or ad-hoc example scripts
- Python 3.12+ required