| name | pytest-config |
| description | Provides standardized pytest config, reusable fixtures, and CI integration patterns. Use when setting up or auditing a Python plugin's test infrastructure. |
| globs | ["**/conftest.py","**/pytest.ini","**/pyproject.toml"] |
| alwaysApply | false |
| category | infrastructure |
| tags | ["pytest","testing","configuration","fixtures"] |
| dependencies | ["leyline:testing-quality-standards"] |
| estimated_tokens | 200 |
| provides | {"infrastructure":["pytest-config","conftest-patterns","coverage-config"]} |
| modules | ["modules/conftest-patterns.md","modules/git-testing-fixtures.md","modules/mock-fixtures.md","modules/ci-integration.md","modules/README.md"] |
| model_hint | standard |
Table of Contents
Pytest Configuration Patterns
Standardized pytest configuration and patterns for consistent testing infrastructure across Claude Night Market plugins.
When To Use
- Setting up pytest configuration and fixtures
- Configuring conftest.py patterns for test infrastructure
When NOT To Use
- Non-Python projects or projects using other test frameworks
- Simple scripts that do not need test infrastructure
Quick Start
Basic pyproject.toml Configuration
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--cov=src",
"--cov-report=term-missing",
"--cov-fail-under=80",
"--strict-markers",
]
markers = [
"unit: marks tests as unit tests",
"integration: marks tests as integration tests",
"slow: marks tests as slow running",
]
[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*", "*/migrations/*", "*/__pycache__/*"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
,
,
,
,
,
,
,
]
=
=