pytest-config
SkillAI & modelsProvides standardized pytest config, reusable fixtures, and CI integration patterns. Use when setting up or auditing a Python plugin's test infrastructure.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the pytest-config skill
What this skill tells your AI
The instructions your AI receives, as published by athola/claude-night-market in plugins/leyline/skills/pytest-config/SKILL.md and read by ahel’s review.
Table of Contents
- Quick Start
- Detailed Patterns
- Integration with Other Skills
- Exit Criteria
- Troubleshooting
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",
"def __repr__",
"def __str__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
precision = 2
show_missing = true
Verification: Run pytest --collect-only to verify discovery, pytest -v --co -q for markers, and pytest --cov for coverage thresholds.
Detailed Patterns
For detailed implementation patterns, see:
- Conftest Patterns - Conftest.py templates, fixtures, test markers, and directory structure
- Git Testing Fixtures - GitRepository helper class for testing git workflows
- Mock Fixtures - Mock tool fixtures for Bash, TodoWrite, and other Claude Code tools
- CI Integration - GitHub Actions workflows and test commands for automated testing
- Module Index: See
modules/README.mdfor module organization overview
Integration with Other Skills
This skill provides foundational patterns referenced by:
parseltongue:python-testing- Uses pytest configuration and fixturespensive:test-review- Uses test quality standardssanctum:test-*- Uses conftest patterns and Git fixtures
Reference in your skill's frontmatter:
dependencies: [leyline:pytest-config, leyline:testing-quality-standards]
Exit Criteria
- pytest configuration standardized across plugins
- conftest.py provides reusable fixtures
- test markers defined and documented
- coverage configuration enforces quality thresholds
- CI/CD integration configured for automated testing
Troubleshooting
Common Issues
Tests not discovered
Ensure test files match pattern test_*.py or *_test.py. Run pytest --collect-only to verify.
Import errors
Check that the module being tested is in PYTHONPATH or install with pip install -e .
Async tests failing
Install pytest-asyncio and decorate test functions with @pytest.mark.asyncio
Signals
- GitHub stars
- 337
- Forks
- 34
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
pytest-config- Source
- github.com/athola/claude-night-market