convention-testing

Enforce pytest conventions for AAA patterns, fixtures, naming, and markers.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/sunLeee/optimization --skill convention-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convention-testing
Source: https://github.com/sunLeee/optimization/tree/main/.claude/skills/process/testing
Command: npx skills add https://github.com/sunLeee/optimization --skill convention-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes pytest testing practices to improve readability, reliability, and maintainability of test suites.

Core Features & Use Cases

  • Enforces the Arrange-Act-Assert (AAA) testing pattern to ensure consistent test structure.
  • Provides naming conventions for test modules, functions, and fixtures to improve discoverability.
  • Guides proper use of fixtures and markers (unit, integration, e2e) to enable selective test execution and clear intent.

Quick Start

Run pytest with unit tests following the AAA pattern to validate fixtures and markers.

Frequently Asked Questions about convention-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the AAA pattern in pytest and how does it improve test maintainability?

The AAA pattern structures tests into Arrange, Act, and Assert sections. Applying this pattern in pytest ensures consistent test structure, directly improving readability, reliability, and maintainability across your test suites.

How do I organize pytest fixtures and markers for unit, integration, and e2e tests?

Use pytest markers to classify tests as unit, integration, or e2e for selective execution. Combine this with standardized naming conventions for fixtures and test modules to ensure clear intent and improve discoverability.

What's the best way to establish consistent naming rules for pytest test functions?

The best way to establish pytest naming rules is to apply standardized conventions for test modules and functions. This improves test discoverability and ensures your suite remains maintainable as it scales.

How do I start enforcing testing conventions for a new pytest project?

Start enforcing pytest conventions by defining structured frontmatter metadata and applying actionable guidelines. Use the quick-start instruction to run pytest with unit tests following the AAA pattern to validate fixtures and markers.

Why do I need markers for selective test execution in pytest?

You need pytest markers for selective test execution to classify unit, integration, and end-to-end tests. This classification enables targeted test runs and provides clear intent, reducing execution time during development.

Does applying strict pytest conventions limit fixture flexibility?

Applying strict pytest conventions does not limit fixture flexibility but guides proper usage. Standardizing fixture naming and structure ensures they remain maintainable and reliable without restricting their functional capabilities.