python-tester-2

Develop Pytest suites with fixtures, mocks, and parameterization for Python projects.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/artsmc/codex-agentic --skill python-tester-2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-tester-2
Source: https://github.com/artsmc/codex-agentic/tree/main/skills/python-tester-2
Command: npx skills add https://github.com/artsmc/codex-agentic --skill python-tester-2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Builds robust Pytest suites for Python projects by emphasizing fixtures, parameterization, and mocks to improve test quality and maintainability.

Core Features & Use Cases

  • Fixture-driven testing with conftest.py to centralize setup
  • Parameterization with pytest.mark.parametrize to cover multiple inputs
  • Async testing support using pytest-asyncio for FastAPI routes
  • Mocking external services to isolate business logic

Quick Start

Create a minimal unit test suite for a service, run pytest, and incrementally add integration tests and fixtures.

Frequently Asked Questions about python-tester-2

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

FAQPage Schema
How do I structure pytest fixtures in conftest.py to organize my test setup?

Pytest fixtures in conftest.py centralize test setup by providing reusable initialization logic across test modules. This approach enforces fixture-driven test organization, improving test maintainability and isolating setup dependencies efficiently.

Can I test async FastAPI routes using pytest?

Yes, you can test async FastAPI routes using pytest with pytest-asyncio. This Skill develops robust test suites supporting async testing, allowing you to validate route behavior and business logic asynchronously.

What is the best way to cover multiple inputs in pytest without repeating code?

Parameterization with pytest.mark.parametrize is the best way to cover multiple inputs without repeating code. It maps multiple data inputs to test arguments, ensuring disciplined test size limits while maximizing test coverage.

How do I isolate business logic by mocking external services in pytest?

Mocking external services in pytest isolates business logic by replacing real dependencies with controlled test doubles. This approach ensures unit tests remain focused on internal code behavior, preventing external network flakiness.

Does this pytest approach support both unit and integration testing?

Yes, this pytest approach supports both isolated unit tests and end-to-end style integration tests. It provides guidance on test structure, naming, and coverage goals to seamlessly scale from simple unit tests to complex integration testing.