python-testing
Python Testing Skill
Generate high-quality pytest tests following best practices for this project.
Core Principles
-
Minimal Mocking: Only mock external dependencies (APIs, databases, file I/O). Test with real Python objects whenever possible. Mocking internal logic can hide breaking changes.
-
Parametrization: Use
@pytest.mark.parametrizefor testing multiple cases instead of writing separate test functions. Keeps tests DRY and readable. -
Shared Fixtures in conftest.py: Place reusable fixtures in
conftest.pyto avoid duplication. Fixtures are automatically discovered by pytest. -
1-1 File Correspondence: Each source file has a corresponding test file (
src/game.py→tests/test_game.py).
Instructions
Step 1: Analyze the Module
More from ikatechis/claude-agentic-mastery
pygame-patterns
Codify reusable pygame patterns for entities, projectiles, movement, and sprite handling. Use when implementing pygame entities or systems that need frame-independent physics, collision detection, or sprite management. References verified patterns from project implementation.
81game-artist
Manage game assets with Kenney-ONLY approach. Search 36,000+ Kenney CC0 assets. If asset not found, ask user to find/generate manually. Ensure style consistency with flat/vector Kenney aesthetic. Auto-triggers on asset requests.
30