Tests Skill
Run the complete test suite and fix any failing tests.
Instructions
- •
Discover test configuration:
- •Check for
pytest.ini,pyproject.toml, orsetup.cfgfor test configuration - •Check for
package.jsonfor JavaScript/TypeScript tests - •Identify test directories:
tests/,test/,*_test.py,test_*.py
- •Check for
- •
Run Python tests:
bashpytest -v --tb=short
If pytest is not available, try:
bashpython -m pytest -v --tb=short
- •
Run JavaScript/TypeScript tests (if applicable):
bashnpm test
or
bashyarn test
- •
For each failing test:
- •
Read the test file and understand what it's testing
- •
Read the implementation being tested
- •
Identify the root cause of the failure
- •
Fix the implementation (preferred) or update the test if the test is incorrect
- •
Re-run the specific test to verify the fix:
bashpytest path/to/test_file.py::test_name -v
- •
- •
Iterate until all tests pass:
- •Continue fixing failures one by one
- •After each fix, run the full test suite to check for regressions
- •Document any tests that cannot be fixed and why
- •
Final verification:
bashpytest -v
Output
Report:
- •Total tests run
- •Tests passed/failed/skipped
- •Fixes applied
- •Any remaining issues that need manual attention