python-testing-patterns

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

wshobson ↓ 28k
Claude Code
View source ↗

What it does

  • 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

Requirements & configuration

  • """Test token expires at correct time."""
  • token = createtoken(expiresinseconds=3600)
  • assert token.expiresat == datetime(2026, 1, 15, 11, 0, 0)
  • """Test token is not expired when within validity period."""
  • assert not token.isexpired()

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

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

Source

Repository: https://github.com/wshobson/agents

python-testing-patterns FAQ

What does the python-testing-patterns skill do?

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices. Writing unit tests for Python code Setting up test suites and test infrastructure

What does python-testing-patterns require?

"""Test token expires at correct time.""" token = createtoken(expiresinseconds=3600) assert token.expiresat == datetime(2026, 1, 15, 11, 0, 0) """Test token is not expired when within validity period.""" assert not token.isexpired()

How do I install python-testing-patterns?

Run: npx -y skills add https://github.com/wshobson/agents --skill python-testing-patterns --agent claude-code — the source lives at github.com/wshobson/agents.

Maintain python-testing-patterns?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

python-testing-patterns on getagentictools
[![python-testing-patterns on getagentictools](https://getagentictools.com/badge/skills/wshobson-agents-python-testing-patterns.svg)](https://getagentictools.com/skills/wshobson-agents-python-testing-patterns?ref=badge)
npx agentictools info skills/wshobson-agents-python-testing-patterns

The second line is the CLI lookup for this page — handy in READMEs and docs.