| name | pytest-config |
| description | Standardized pytest configuration for plugin development with shared test patterns.
Triggers: pytest configuration, conftest, fixtures, test setup
Use when: setting up pytest for plugin development or creating fixtures
|
| 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"] |
Pytest Configuration Patterns
Standardized pytest configuration and patterns for consistent testing infrastructure across Claude Night Market plugins.
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",
"def __repr__",
"def __str__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
precision = 2
show_missing = true
Detailed Patterns
For detailed implementation patterns, see: