Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Python Testing

ASecurity

Create deterministic pytest unit, integration, and property tests with fixtures, parametrization, and isolated side effects.

12 stars
0 votes
0 copies
0 views
Added 10/6/2026
ai-agentspythongonodeexpressfastapidjangoflasktestingapidatabase

Works with

cliapi

Security Analysis

A100/100

Scanned 10/6/2026

$npx -y skills add startmeupai/swe-agents --skill python-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Testing?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Python Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/startmeupai-python-testing/badge)](https://www.skillsdirectory.com/skills/startmeupai-python-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: python-testing
description: Create deterministic pytest unit, integration, and property tests with fixtures, parametrization, and isolated side effects.
---

# Python Testing

## Trigger Conditions

Use when Python behavior needs focused automated coverage below the browser layer, or when a
pytest suite is flaky, order-dependent, or slow.

## Required Inputs

- Target behavior, code under test, and its success, boundary, failure, and authorization cases.
- pytest configuration, registered markers, existing `conftest.py` fixtures, and installed plugins.

## Workflow

1. Inspect `[tool.pytest.ini_options]` or `pytest.ini`, registered markers, `conftest.py` fixtures,
   and installed plugins and libraries such as pytest-asyncio or anyio, pytest-django, pytest-cov,
   pytest-randomly, and hypothesis before writing tests.
2. Choose the narrowest layer: plain unit tests for domain functions, service tests with fakes that
   satisfy the collaborator's `Protocol`, and integration tests through the framework's test client
   (FastAPI `TestClient` with `dependency_overrides`, pytest-django's `client` and `db` fixtures or
   Django `TestCase`, or Flask `test_client`).
3. Express case tables with `pytest.mark.parametrize` and readable `ids`, covering success,
   boundary, invalid-input, and denied-access cases; assert failures with
   `pytest.raises(SomeError, match=...)`.
4. Build setup from the narrowest-scoped fixtures, `yield` fixtures for teardown, and factory
   fixtures for variations; place shared fixtures in the nearest `conftest.py`.
5. Isolate side effects: `monkeypatch` for environment and attributes, `tmp_path` for files,
   `caplog` for log assertions, injected or frozen clocks, seeded `random.Random` instances, and
   fakes or `unittest.mock.create_autospec` at stable boundaries instead of patching internals.
6. When hypothesis is already a dependency, add property tests for invariants such as round trips,
   idempotence, and ordering with bounded strategies; do not add it without approval.
7. For async code, use the project's configured async plugin and await every task; never wait for
   state with `time.sleep` or `asyncio.sleep`.
8. Run the focused node IDs (for example `pytest -q tests/test_export.py::test_denies_non_owner`),
   then the pack's test command (`pytest -q`), and the lint (`ruff check .`) and typecheck
   (`mypy .`) commands when tests are in their scope.
9. Re-run the new tests, with a different `--randomly-seed` when pytest-randomly is installed, to
   confirm order independence; report coverage of changed modules when coverage is configured.

## Deterministic Checks

- Focused and full pytest results with pass, fail, skip, and xfail counts.
- Repeated runs give the same outcome, and every marker used is registered.
- Lint and typecheck pass for test code wherever the project configures them to cover tests.

## Safety and Permission Boundaries

- Do not call live networks or providers, use real credentials, or touch shared databases.
- Do not weaken assertions, add `skip` or `xfail` to pass, lower coverage thresholds, or change
  production logic to make a test pass.

## Required Evidence

- Test node IDs, commands, pass, fail, skip, and xfail counts, seeds used, coverage figures when
  configured, and unrelated failures.

## Completion Condition

- Required cases pass deterministically across repeated runs and would fail if the behavior
  regressed.

## Example

`Add parametrized denied-access tests for the ExampleApp Project Alpha export service.`

Attribution

startmeupaistartmeupai
View sourceSee grades on GitHubMore from startmeupai →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →