python-testing

python-testing is a skill for Claude Code, Codex from fmind/dot. It costs 19 tokens per session (1,043 once invoked), scanned A, original, MIT.

A Python testing guide using pytest, a Python testing tool, along with fixtures, property-based tests, and test-driven development (TDD). TDD means writing a failing test before the code that makes it pass.

In plain words
What is it for?
Use it to write focused Python tests, apply the fail-pass-refactor cycle, maintain pytest fixtures and assertions, and check nearby tests after a change.
Why use it?
It provides a small, repeatable way to prove a behavior change and catch regressions without confusing setup failures with real test failures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write focused Python tests, apply the fail-pass-refactor cycle, maintain pytest fixtures and assertions, and check nearby tests after a change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fmind/dot/python-testing
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 fmind/dot --skill python-testing
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

Made for: Claude Code, Codex.

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 python-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/python-testing/github.svg)](https://agentmods.dev/skills/fmind/dot/python-testing)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/python-testing"><img src="https://agentmods.dev/badge/skills/fmind/dot/python-testing/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 python-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/fmind/dot/python-testing"><img src="https://agentmods.dev/badge/skills/fmind/dot/python-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,043 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.00019 $0.01043
Opus 5.5 $0.00008 $0.00417
Sonnet 5.5 $0.00004 $0.00209
Haiku 4.5 $0.00002 $0.00104

Measured 4d ago against content hash 47243fd8de73, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-30, from the pricing page.

Security

Grade A, and why

python-testing 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 4d 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.

skills/python-testing/SKILL.md · 50 lines

How it starts

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

Python Testing

Prove a change with an honest red-green-refactor cycle: a failing test that detects the missing or broken behavior, then the smallest trustworthy change; quality-assurance owns the broader campaign and systematic-debugging owns failures not yet understood.

For pytest fixture, collection, or assertion maintenance, use pytest mechanics directly. Use the red-green-refactor workflow below when implementing a behavior change; test-only maintenance does not require inventing a production change.

Workflow

  1. Discover the harness: Read repository instructions, existing tests, task definitions, and nearby patterns; find the smallest command that exercises the target behavior.
  2. State the contract: Name the production change that would make the test pass and a plausible regression that would make it fail.
  3. RED: Write one minimal test for one observable behavior; run it and confirm it fails for the missing behavior, not for a syntax, fixture, environment, or setup error.
  4. GREEN: Implement only enough production code to satisfy that test; run the focused test and read the full output.
  5. Protect the neighborhood: Run the package or subsystem tests; fix production code when the new behavior breaks a valid existing contract and revisit the spec when contracts conflict.
  6. REFACTOR: Improve names, structure, duplication, and types only while everything stays green; add no behavior.
  7. Repeat: Take the next smallest behavior, edge case, or failure path through a new red cycle.
  8. Prove the regression test: Reuse the observed red result. If implementation preceded the test or its ability to detect the defect remains uncertain, safely exercise the test against the unfixed code in isolation, then confirm green with the fix.
  9. Qualify proportionately: reuse passing focused and subsystem results while relevant inputs remain unchanged; add affected static checks. Run the full gate only when repository policy or cross-cutting risk requires it. Apply the dirty-tree rule when unrelated work is present.
  10. Report evidence: summarize the observed red and green outcomes, checks actually run, and remaining limits; do not run additional suites merely to fill the report.

Read the full file on GitHub · 50 lines

Files

What ships with it

2 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. 4d ago Changed 47243fd8de73
  2. 7d ago Changed c01950a0d220
  3. 10d ago Changed 3203f1aabf8b
  4. 13d ago First seen · 50 lines · 19 tokens per session scan A 8441a64a4c38

Subscribe to this mod's changes

python-testing is a skill published in the GitHub repository fmind/dot (9 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 1,043 once invoked, about $0.0001 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-17.