running-tests
Run tests to ensure code functionality and correctness.
When & Why to Use This Skill
This Claude skill automates the execution of software tests to ensure code functionality, reliability, and correctness. By leveraging tools like pytest, it enables developers to perform targeted test runs, verify complex refactors, and maintain high-quality code standards with optimized performance by avoiding unnecessary full-suite executions.
Use Cases
- Regression Testing: Automatically run relevant test cases after code modifications to ensure that existing functionality remains intact and no new bugs are introduced.
- Refactoring Validation: Execute specific tests before and after significant code refactors or API changes to confirm that the system's behavior is preserved.
- Targeted Debugging: Run individual test functions or specific modules to isolate and identify the root cause of failures without the overhead of running the entire test suite.
- Continuous Quality Assurance: Integrate automated testing into the development workflow to provide immediate feedback on code health and prevent performance regressions.
| name | running tests |
|---|---|
| description | Run tests to ensure code functionality and correctness. |
Running Tests
DO NOT RUN ALL TESTS AT ONCE UNLESS EXPLICITLY INSTRUCTED TO DO SO.
Prefer running only the tests relevant to the code you have modified or added.
Use
pytestto run tests from the repository root, for example:pytest nimare/tests/test_annotate_gclda.py::test_gclda_symmetricFor a slightly broader check without performance-heavy tests, mirror the
Makefilebehavior:pytest -m "not performance_estimators and not performance_correctors and not performance_smoke and not cbmr_importerror" --cov=nimare nimareRun tests before and after significant refactors or API changes to confirm behavior is preserved.