pytest-patterns

Community

Automate PyTest patterns to boost test quality.

Authorricardoroche
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps ensure tests follow established pytest patterns and best practices, reducing flaky tests and simplifying maintenance.

Core Features & Use Cases

  • Basic Test Pattern: Structure tests with Arrange/Act/Assert and clear naming.
  • Async Test Pattern: Provide patterns for testing async code with pytest.mark.asyncio.
  • Fixtures: Demonstrates use and scope of fixtures (function, session, module) and teardown.
  • Parametrize for Multiple Test Cases: Run multiple inputs against a single test function.
  • Mocking: Use unittest.mock to mock dependencies within tests.

Quick Start

Apply pytest-patterns to your test file (e.g., test_api.py) to ensure fixtures, parametrize, and mocks follow best practices.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: pytest-patterns
Download link: https://github.com/ricardoroche/ricardos-claude-code/archive/main.zip#pytest-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.