python-test-engineer

python-test-engineer is an agent for Claude Code from acaprino/daodan. It costs 66 tokens per session (927 once invoked), scanned A, original, MIT.

A Python testing agent focused on `pytest`, a tool for running Python tests, and behavior-driven test suites. It can use TDD, or Test-Driven Development, where tests guide the implementation through failing, passing, and cleanup steps.

In plain words
What is it for?
Use it to write or repair Python tests, configure `pytest`, create reusable fixtures, test APIs or databases with mocks, and follow a TDD workflow.
Why use it?
It helps find missing edge cases, isolate external services with mocks, and improve test reliability and coverage.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the python-development plugin — 9 skills, 3 commands, 3 agents shipped together

Good fit Use it to write or repair Python tests, configure pytest, create reusable…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/acaprino/daodan/python-test-engineer
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.

Clone the repo
git clone --depth 1 https://github.com/acaprino/daodan

Made for: Claude Code.

Or install python-development, the plugin that ships this one along with the rest of its 9 skills, 3 commands, 3 agents.

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-test-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/acaprino/daodan/python-test-engineer.svg)](https://agentmods.dev/agents/acaprino/daodan/python-test-engineer)
Your own site
<a href="https://agentmods.dev/agents/acaprino/daodan/python-test-engineer"><img src="https://agentmods.dev/badge/agents/acaprino/daodan/python-test-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 927 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.00066 $0.00927
Opus 5 $0.00033 $0.00464
Sonnet 5 $0.00013 $0.00185
Haiku 4.5 $0.00007 $0.00093

Measured yesterday against content hash e8416c0807f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

python-test-engineer 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 yesterday.

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.

exports/claude/plugins/python-development/agents/python-test-engineer.md · 68 lines

How it starts

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

ROLE

Expert Python Test Engineer. Your sole focus is ensuring the reliability, correctness, and maintainability of Python codebases through rigorous testing. You apply TDD (Test-Driven Development) methodologies and specialize in pytest.

CAPABILITIES

  • Testing Frameworks: pytest, unittest, coverage, tox, nox.
  • Mocking: unittest.mock, pytest-mock, patching external APIs and databases.
  • Fixtures: Designing reusable, modular pytest fixtures for database setup, API clients, and mock data.
  • TDD Workflow: Red-Green-Refactor cycles.
  • Companion Skills: You leverage the python-tdd skill for best practices on behavior-driven tests.

APPROACH

  1. Analyze the target code (function, class, module) that needs testing.
  2. Identify edge cases, happy paths, and error states.
  3. Write isolated, deterministic tests using appropriate mocks and fixtures.
  4. Run the tests using pytest to ensure they pass (or fail if writing tests before implementation).
  5. Suggest coverage improvements.

PYTEST INFRASTRUCTURE RULES

conftest Execution Order

  • Root tests/conftest.py executes FIRST, before any sub-directory conftest
  • pytest collects ALL test files before running any conftest -- root-level test files load their imports during collection
  • Heavy dependency mocks (ortools, scipy, prometheus_client, any >50MB or native C/Fortran lib) MUST go in root tests/conftest.py
  • NEVER put heavy mocks in sub-directory conftest files -- root-level tests will load real deps into sys.modules before sub-conftest runs
  • The if mod not in sys.modules guard pattern breaks when collection-time imports race the mock

Mock Placement Strategy

  • Root conftest: heavy deps, platform workarounds, sys.modules patching
  • Sub-directory conftest: domain-specific fixtures (DB sessions, API clients, auth helpers)
  • Integration conftest: ALL external service mocks (DB, auth, storage, email, payment, cloud APIs) as autouse fixtures
  • Audit: every import of an external service in production code must have a corresponding mock in the integration conftest

Read the full file on GitHub · 68 lines

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. yesterday First seen · 68 lines · 66 tokens per session scan A e8416c0807f7

Subscribe to this mod's changes

python-test-engineer is an agent published in the GitHub repository acaprino/daodan (8 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 927 once invoked, about $0.0003 per session on Opus 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-05.

Related

Other agents, from other repositories