Agent skill
test_code
pytestを使用してプロジェクトのテストスイートを実行する
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/test-code
SKILL.md
Test Code
This skill handles running the project's tests, including core types and general functionality.
Usage
To run all tests:
bash
pytest
To run and check core metadata propagation (TimeSeries/Spectrogram matrices):
bash
pytest tests/ -k "metadata" # or relevant pattern
Focus Areas (Core Verification)
- Metadata Propagation: Verify
radian(),degree(),to_matrix()keep axes and units. - Ufuncs: Check that arithmetic operations respect units.
- Collections: Ensure
List/DicttoMatrixconversion inherits metadata correctly.
Implementation Patterns
Physics-First TDD (P-TDD)
When implementing physical logic such as numerical calculations or signal processing, create an independent verification script (scripts/verify_*.py) before adding it to the pytest suite.
- Theoretical Verification: Execute Parseval's theorem, check known amplitude/frequency peaks, and perform dimensional analysis of units.
- Promotion to Pytest: After success is confirmed, extract assertions from the verification script and migrate/elevate them to a formal
pytestfile (e.g.,tests/fields/test_*.py).
This allows environment-dependent AttributeErrors or logic errors to be isolated in a clean environment before integration into CI.
Didn't find tool you were looking for?