← Back to list

python-test-strategy
by MacHu-GWU
Sanhe's Claude Code Plugins
⭐ 0🍴 0📅 Jan 14, 2026
SKILL.md
name: python-test-strategy description: Python unit testing patterns for pytest, including test file structure, fixtures, mocks, and coverage strategy. Use when asked to write tests (unit/integration) for any Python module, function, class, or method.
python-test-strategy
Organized testing strategy for Python projects: test file naming, coverage goals (95%+), and public API testing.
Quick Start
Find test location for any source file:
When being asked to write tests for a specific source file, use the following command to determine the correct test file path based on established naming conventions:
uvx --from shai-py==0.1.1 shai-py test-path /path/to/my_package/subpackage/module.py
Run tests:
- Individual file:
.venv/bin/python tests/subpackage/test_*.py - Package:
.venv/bin/python tests/subpackage/all.py - All:
.venv/bin/python tests/all.py
Key Patterns
- Test files mirror source:
source/<pkg>/<module>.py→tests/<pkg>/test_<pkg>_<module>.py - Coverage goal: 95%+ for all implementation files
- Public API: Export all public interfaces in
api.py, test intests/test_api.py
References
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon