Python testing patterns with pytest, fixtures, TDD, mocking, async and integration tests. Use when writing or auditing a Python test suite.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Python Testing Hub
Testing standards for pytest configuration, fixture management, and TDD implementation.
## Quick Start
1. **Dependencies**: `pip install pytest pytest-cov pytest-asyncio pytest-mock`
2. **Configuration**: Add the following to `pyproject.toml`:
```toml
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov=src"
```
3. **Verification**: Run `pytest` to confirm discovery of files matching `test_*.py`.
## When To Use
- Constructing unit and integration tests for Python 3.9+ projects.
- Isolating external dependencies using `pytest-mock` or custom monkeypatching.
- Validating asynchronous logic with `pytest-asyncio` markers and event loop management.
- Configuring project-wide coverage thresholds and reporting.
## When NOT To Use
- Evaluating test
quality - use pensive:test-review instead
- Infrastructure test
config - use leyline:pytest-config
## Modules
This skill uses modular loading to manage the system prompt budget.
### Core Implementation
- See `modules/unit-testing.md` - AAA (Arrange-Act-Assert) pattern, basic test structure, and exception validation.
…
The line at the top of this page pins the label git:20260902.4a35d69, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_ln6zbawohe6zuq7b
GET https://markdownregistry.com/api/v1/resolve?ref=athola/claude-night-market/python-testing
GET https://markdownregistry.com/api/v1/blob/00ee3e6d50c69a2bf674df800b6edd90b80c81807914d34c7c14ccd720a758d1
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
athola/claude-night-market · .claude/skills/claude-code-plugin-reference/SKILL.md · Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not…
athola/claude-night-market · .claude/skills/night-market-architecture-contract/SKILL.md · States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating…
athola/claude-night-market · .claude/skills/night-market-build-and-env/SKILL.md · Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for…
athola/claude-night-market · .claude/skills/night-market-change-control/SKILL.md · Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage…
athola/claude-night-market · .claude/skills/night-market-collective-memory/SKILL.md · Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for…
athola/claude-night-market · .claude/skills/night-market-completion-integrity-campaign/SKILL.md · Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA…
athola/claude-night-market · .claude/skills/night-market-config-catalog/SKILL.md · Catalog every config axis, its defaults and guards. Use when adding or auditing configuration. Do not use for running…
athola/claude-night-market · .claude/skills/night-market-debugging-playbook/SKILL.md · Triage night-market failures by symptom (hooks, CI, tests). Use when a check fails unexpectedly. Do not use for routine…
athola/claude-night-market · .claude/skills/night-market-diagnostics-toolkit/SKILL.md · Run and interpret repo diagnostic scripts (ratchets, validators, token stats). Use when measuring health. Do not use to…
athola/claude-night-market · .claude/skills/night-market-docs-and-writing/SKILL.md · Maintain docs of record, ADRs, changelog, and house style. Use when writing repo docs. Do not use for release steps…
athola/claude-night-market · .claude/skills/night-market-failure-archaeology/SKILL.md · Chronicles settled battles, reverts, and dead ends. Use when a fix echoes a past failure. Do not use for live triage…
athola/claude-night-market · .claude/skills/night-market-model-and-harness-updates/SKILL.md · Sweep plugins, skills, agents, commands, and hooks after a model release or Claude Code version bump. Use when upstream…
dmitriyyukhanov/claude-plugins · plugins/python-dev/skills/python-testing/SKILL.md · Python testing patterns with pytest including unit tests, integration tests, fixtures, mocking, and coverage. Use when…
dmitriyyukhanov/agent-plugins · plugins/python-dev/skills/python-testing/SKILL.md · Python testing patterns with pytest including unit tests, integration tests, fixtures, mocking, and coverage. Use when…
bitwise-media-group/skills · plugins/python/skills/python-testing/SKILL.md · Python test authoring and review with pytest. Use when writing, adding, generating, or reviewing Python tests or unit…