$npx skillfedfor your agent

Pytest Configuration

Set up pytest with production-ready configuration patterns covering test discovery, async support, custom markers, and coverage reporting. Includes conftest.py hierarchy examples and fixture scoping strategies for consistent test behavior across environments.

Pytest Configuration helps you set up pytest with pyproject.toml, markers, discovery patterns, and coverage reporting.

AI-generated summary based on this skill's SKILL.md

1 0 unlicensed, metadata onlyupdated by dawiddutoit

Decision gist · record as of 2026-01-26

Pytest Configuration helps you set up pytest with pyproject.toml, markers, discovery patterns, and coverage reporting. Set up pytest with production-ready configuration patterns covering test discovery, async support, custom markers, and coverage reporting. Includes conftest.py hierarchy examples and fixture scoping strategies for consistent test behavior across environments.

manual: git clone https://github.com/dawiddutoit/custom-claude → cp -r custom-claude ~/.claude/skills/pytest-configuration

Use it when

  • Pytest Configuration supports options like testpaths (directories to search).
  • Pytest Configuration's pytest.ini setup involves defining [pytest] sections with your test discovery rules and markers.
Same gist for agents: .md · .json

Install

dawiddutoit/custom-claude/pytest-configuration · repository language: Python

generated, unverified - the skill's exact subdirectory could not be determined; check the repository on GitHub

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I configure pytest for my project?

Pytest Configuration lets you set up the testing framework through pytest.ini, pyproject.toml, tox.ini, or setup.cfg files. Place configuration at your project root to define test discovery patterns, marker definitions, and plugin options. Use conftest.py files at different directory levels to manage fixture scoping and shared test utilities across your test suite.

What are the main pytest configuration options?

Pytest Configuration supports options like testpaths (directories to search), python_files/python_classes/python_functions (naming patterns), addopts (default command-line flags), markers (custom test markers), asyncio_mode (async test support), and filterwarnings (warning handling). Each option controls test discovery, execution behavior, and reporting output for consistent test runs.

How should I set up pytest.ini for my tests?

Pytest Configuration's pytest.ini setup involves defining [pytest] sections with your test discovery rules and markers. Specify testpaths to limit where pytest searches, register custom markers like @pytest.mark.slow or @pytest.mark.integration, and set addopts for default flags such as -v for verbose output or --strict-markers to catch typos in marker names.

What is conftest.py and how does Pytest Configuration use it?

Pytest Configuration uses conftest.py files to define fixtures, hooks, and shared test configuration at project or directory levels. Fixtures defined in conftest.py are automatically available to all tests in that directory tree. Use function, class, module, or session scope to control fixture lifetime and reuse, enabling consistent setup/teardown behavior across your entire test suite.

What are pytest configuration best practices?

Pytest Configuration best practices include: store config in pyproject.toml for single source of truth, use conftest.py hierarchy to organize fixtures by scope, register all custom markers to catch typos, set testpaths to speed up discovery, use strict-markers flag, and separate environment-specific settings via tox.ini or environment variables for CI/local consistency.

How do I troubleshoot pytest configuration issues?

Pytest Configuration troubleshooting starts with running pytest --version and pytest --co to verify discovery. Check for conftest.py conflicts across directory levels, validate pytest.ini syntax, use pytest -v to see which tests run, and enable pytest's debug mode with --setup-show to trace fixture execution and configuration loading order.

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Configure pytest testing framework for project”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

Pytest Test Data Factories
by dawiddutoit · dawiddutoit/custom-claude

This skill teaches patterns for building maintainable test data in pytest through factory functions, builder patterns, and fixture factories. Learn to eliminate test data duplication by providing sensible defaults and easy customization for domain objects, complex structures, and parameterized datasets.

no license declared → metadata onlyupdated Jan 2026
★ 1repo stars
Pytest Type Safety
by dawiddutoit · dawiddutoit/custom-claude

Add type annotations to test functions and fixtures, then configure mypy to validate them during test runs. Use create_autospec for type-safe mocks that enforce interface contracts and catch typos at runtime.

no license declared → metadata onlyupdated Jan 2026
★ 1repo stars
Pytest Patterns
by hieutrtr · hieutrtr/ai1-skills

Pytest Patterns teaches structured testing for Python backends using pytest, httpx, and factory_boy. Learn to organize tests across unit and integration layers, build reusable fixtures with proper scoping, seed test data with factories, and test async FastAPI endpoints. Covers mocking, parametrization, and conftest hierarchy—but skips frontend and E2E testing.

no license declared → metadata onlyupdated Feb 2026
★ 8repo stars
pytest
by xobotyi · xobotyi/cc-foundry

Master pytest's core patterns for writing maintainable tests: fixtures for setup and teardown, parametrize for test variations, and monkeypatch for mocking. Learn test structure, granularity, and scope management to build fast, isolated unit tests that serve as executable documentation.

MITupdated Jul 2026
★ 18repo stars
Pytest Async Testing
by dawiddutoit · dawiddutoit/custom-claude

Master async testing in Python with production-ready patterns for pytest-asyncio, async fixtures, and mocking. Covers FastAPI endpoints, Kafka clients, context managers, and async generators with proper event loop isolation.

no license declared → metadata onlyupdated Jan 2026
★ 1repo stars
pytest-config
by athola · athola/claude-night-market

pytest-config provides templates and patterns for pytest setup, conftest.py fixtures, test markers, and coverage configuration. It includes Git testing helpers, mock fixtures for Claude Code tools, and GitHub Actions integration to automate test execution across Python projects.

MITupdated Jul 2026
★ 323repo stars

More skills Pytest Mocking Strategy (unlicensed) · python-testing (MIT) · Textual Test Fixtures (unlicensed) · Pytest Domain Model Testing (unlicensed) · Setup Pytest Fixtures (unlicensed) · Pytest Application Layer Testing (unlicensed) · testing-quality-standards (MIT) · Pytest Adapter Integration Testing (unlicensed)

Tags
test-framework-setuppytest-automationtesting-infrastructureci-cd-testingtest-runner-config