pytest-config
'Standardized pytest configuration for Claude Night Market plugin testing with reusable fixtures and CI integration
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/athola/nm-leyline-pytest-configNight Market Skill — ported from claude-night-market/leyline. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
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
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-athola-nm-leyline-pytest-config": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
extract
Analyze a codebase and build a knowledge base of business logic, architecture, data flow, and engineering patterns. The foundation for gauntlet challenges and agent integration
discourse
>- Scan community discussion channels (HN, Lobsters, Reddit, tech blogs) for experience reports and opinions on a topic
synthesize
>- Merge, deduplicate, rank, and format research findings from multiple channels into a coherent report. Use after research agents return their results
workflow-monitor
Detect workflow failures and inefficient patterns, then create GitHub issues for improvement via /fix-workflow
architecture-paradigm-hexagonal
Hexagonal (Ports and Adapters) architecture isolating domain logic from infrastructure