Claude Code Plugins

Community-maintained marketplace

Feedback

Standardized pytest configuration patterns for plugin development. Reduces duplication across parseltongue, pensive, sanctum, and other plugins.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name pytest-config
description Standardized pytest configuration patterns for plugin development. Reduces duplication across parseltongue, pensive, sanctum, and other plugins.
category infrastructure
tags pytest, testing, configuration, fixtures
dependencies leyline:testing-quality-standards
estimated_tokens 200
provides [object Object]
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:

  • 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

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