python-testing

Installation
SKILL.md

Python Testing Skill

Generate high-quality pytest tests following best practices for this project.

Core Principles

  1. 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.

  2. Parametrization: Use @pytest.mark.parametrize for testing multiple cases instead of writing separate test functions. Keeps tests DRY and readable.

  3. Shared Fixtures in conftest.py: Place reusable fixtures in conftest.py to avoid duplication. Fixtures are automatically discovered by pytest.

  4. 1-1 File Correspondence: Each source file has a corresponding test file (src/game.pytests/test_game.py).

Instructions

Step 1: Analyze the Module

Related skills
Installs
7
First Seen
Feb 22, 2026