python-testing-patterns

Installation
Summary

Comprehensive testing strategies for Python using pytest, fixtures, mocking, and test-driven development.

  • Covers unit, integration, functional, and performance testing with the AAA pattern (Arrange, Act, Assert) for test structure
  • Includes 10 fundamental and advanced patterns: basic tests, fixtures with setup/teardown, parameterization, mocking, exception handling, async testing, monkeypatching, temporary files, custom fixtures, and property-based testing
  • Provides test design principles, naming conventions, database testing, retry logic, time control with freezegun, markers, and coverage reporting
  • Includes CI/CD integration examples and configuration files (pytest.ini, pyproject.toml) for standardized test execution
SKILL.md

Python Testing Patterns

Comprehensive guide to implementing robust testing strategies in Python using pytest, fixtures, mocking, parameterization, and test-driven development practices.

When to Use This Skill

  • Writing unit tests for Python code
  • Setting up test suites and test infrastructure
  • Implementing test-driven development (TDD)
  • Creating integration tests for APIs and services
  • Mocking external dependencies and services
  • Testing async code and concurrent operations
  • Setting up continuous testing in CI/CD
  • Implementing property-based testing
  • Testing database operations
  • Debugging failing tests

Core Concepts

Related skills

More from wshobson/agents

Installs
19.7K
Repository
wshobson/agents
GitHub Stars
35.2K
First Seen
Jan 20, 2026