pytest-config

'Standardized pytest configuration for Claude Night Market plugin testing with reusable fixtures and CI integration

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pytest-config" with this command: npx skills add athola/nm-leyline-pytest-config

Night 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

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.md for module organization overview

Integration with Other Skills

This skill provides foundational patterns referenced by:

  • parseltongue:python-testing - Uses pytest configuration and fixtures
  • pensive:test-review - Uses test quality standards
  • sanctum: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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Multi Edge-TTS CN

Edge-TTS 在线语音合成 skill。基于微软 Edge TTS 引擎,生成速度快(1-2秒),支持多种音色和输出格式。同时支持飞书(OGG/Opus)和企业微信(AMR)。默认音色 xiaoxiao_lively。需联网。

Registry SourceRecently Updated
General

vedic-destiny

吠陀命盘分析中文入口。用于完整命盘研判、命主盘 Rashi chart 与九分盘 Navamsha chart 联读、既往事件回看、出生时间稳定度判断、事业主题、婚姻主题、时空盘专题,以及基于 Jagannatha Hora PDF、星盘截图或文本命盘数据的系统拆盘。当用户提到完整星盘、事业方向、婚姻问题、关系窗...

Registry SourceRecently Updated
General

One Person Company OS

Build a visual operating cockpit for an AI-native one-person company across promise, buyer, product, delivery, cash, learning, and assets. / 为 AI 一人公司建立可视化经营...

Registry SourceRecently Updated
General

健康追踪

健康追踪技能 - 追踪饮水、睡眠、步数等健康数据,JSON存储。

Registry SourceRecently Updated