testing-python

testing-python is a skill for Claude Code from qte77/claude-code-plugins. It costs 39 tokens per session (779 once invoked), scanned A, original, Apache-2.0.

A Python testing guide that writes behavior-focused tests with pytest and Hypothesis. TDD means writing a failing test, making it pass, and then improving the code.

In plain words
What is it for?
Use it for unit, integration, property-based, and regression tests in Python projects.
Why use it?
It catches known cases and edge cases while keeping tests tied to what the software should do rather than how it is implemented.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

Part of the python-dev plugin — 3 skills shipped together

Good fit Use it for unit, integration, property-based, and regression tests in Python projects.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qte77/claude-code-plugins/testing-python
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add qte77/claude-code-plugins --skill testing-python
Clone the repo
git clone --depth 1 https://github.com/qte77/claude-code-plugins

Made for: Claude Code.

Or install python-dev, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/qte77/claude-code-plugins/testing-python/github.svg)](https://agentmods.dev/skills/qte77/claude-code-plugins/testing-python)
Your own site
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/testing-python"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/testing-python/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing-python

Your own site · 80×15
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/testing-python"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/testing-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 779 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00779
Opus 5.5 $0.00016 $0.00312
Sonnet 5.5 $0.00008 $0.00156
Haiku 4.5 $0.00004 $0.00078

Measured 1mo ago against content hash 0be1d4d280ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing-python scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/python-dev/skills/testing-python/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Testing

Target: $ARGUMENTS

Writes focused, behavior-driven tests following project testing strategy.

Quick Reference

TDD methodology (language-agnostic): See tdd-core plugin (testing-tdd skill)

Python-specific documentation: references/

  • references/testing-strategy.md - Python tools (pytest, Hypothesis, inline-snapshot)
  • references/tdd-best-practices.md - Python TDD examples (extends tdd-core)

Approach

TDD only: pytest for known cases, Hypothesis for edge cases, inline-snapshot for regression. Tests assert observable behavior — inputs produce expected outputs/side-effects. No Gherkin, no feature files, no step definitions.

See references/testing-strategy.md for tool selection guide.

TDD Essentials (Quick Reference)

Cycle: RED (failing test) → GREEN (minimal pass) → REFACTOR (clean up)

Structure: Arrange-Act-Assert (AAA)

def test_order_processor_calculates_total():
    # ARRANGE
    items = [Item(price=10.00, qty=2), Item(price=5.00, qty=1)]
    processor = OrderProcessor()

    # ACT
    total = processor.calculate_total(items)

    # ASSERT
    assert total == 25.00

Hypothesis Priorities (Edge Cases within TDD)

Priority Area Example
CRITICAL Math formulas Scores always in bounds
CRITICAL Loop termination Never hangs
HIGH Input validation Handles any text
HIGH Serialization Always valid JSON

What to Test (KISS/DRY/YAGNI)

High-Value: Business logic, integration points, edge cases, contracts

Avoid: Library behavior, trivial assertions, implementation details, default constants, stale fixture patches (see references/testing-strategy.md → "Patterns to Remove")

See references/testing-strategy.md → "Patterns to Remove" for full list.

Naming Convention

Format: test_{module}_{component}_{behavior}

test_user_service_creates_new_user()
test_order_processor_validates_items()

Read the full file on GitHub · 98 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 98 lines · 39 tokens per session scan A 0be1d4d280ee

Subscribe to this mod's changes

testing-python is a skill published in the GitHub repository qte77/claude-code-plugins (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 39 tokens to every session and 779 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

python-testing

Python test authoring and review with pytest. Use when writing, adding, generating, or reviewing Python tests or unit tests for a function, module, or class; running pytest or a single test (the -k flag and other invocation flags for a Makefile or CI); parametrizing test cases into the table-driven pattern; setting up…

bitwise-media-group/skills · 178 tokens

dotnet-test

This skill should be used when running .NET tests selectively with a build-first, test-targeted workflow. Use it for running tests with xUnit focus.

NikiforovAll/claude-code-rules · 35 tokens

litestar-testing

Auto-activate for test.py, conftest.py, litestar.testing, TestClient, AsyncTestClient, createtestclient, createasynctestclient, anyio, Guard mocks, or DI overrides. Not for generic pytest.

litestar-org/litestar-skills · 53 tokens

python-testing

Python testing patterns with pytest including unit tests, integration tests, fixtures, mocking, and coverage. Use when writing Python tests.

DmitriyYukhanov/claude-plugins · 28 tokens

go-testing

Use when writing, reviewing, or running Go tests in test.go files — writing tests for a Go package, adding table-driven tests with t.Run subtests, testing a Go HTTP handler with httptest, adding a Go fuzz test or seed corpus, running or choosing go test flags (-race, -fuzz, -fuzztime), or deciding whether to use…

bitwise-media-group/skills · 0 tokens

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

wshobson/agents · 45 tokens