python-testing

Generate pytest unit tests with parametrization and shared conftest.py fixtures.

Updated Dec 24, 2025
One-click install
npx skills add https://github.com/ikatechis/claude-agentic-mastery --skill python-testing-ikatechis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-testing
Source: https://github.com/ikatechis/claude-agentic-mastery/tree/main/.claude/skills/python-testing
Command: npx skills add https://github.com/ikatechis/claude-agentic-mastery --skill python-testing-ikatechis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps Python developers automate the creation and maintenance of robust unit tests for Python modules using pytest. It emphasizes parametrization, shared fixtures in conftest.py, and minimal mocking to reduce debugging time and improve test reliability.

Core Features & Use Cases

  • Parametrization: Use pytest.mark.parametrize to cover multiple inputs in a single test, reducing duplication.
  • Shared Fixtures in conftest.py: Promote reusable fixtures for tests to avoid repetitive setup.
  • Minimal Mocking: Mock only external dependencies; test with real objects when possible to catch real bugs.
  • 1-1 File Correspondence: Ensure every source file has a corresponding test file following tests/test_<module>.py naming.

Quick Start

Generate tests for a Python module (e.g., src/game.py) and place the result in tests/test_game.py. Use pytest with parametrization and shared fixtures, and keep mocks limited to external dependencies.