Python testing

From HoangNguyen0403/agent-skills-standard · View interactive version

Python testing is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Test Python services with pytest, async coverage, monkeypatch, and boundary-focused fakes. Use when writing Python tests, fixtures, async tests, regression tests, or dependency-isolated verification.

How to use this skill

Skill file

Python Testing

**Priority: P0 (CRITICAL)**

Universal anti-slop rules (identity fixtures, tautologies, skip/focus, mock echoing, bug-first lock, sleeps, shallow

assertions, coverage): anti-slop-rules.md. Only Python deltas

follow.

Stack Deltas

high enough to keep the test readable; no broad monkeypatch spray.

stay separate.

not shallow truthiness or implementation trivia.

Recipe

  1. Write the failing test first for the boundary or regression.
  2. Patch one seam high enough to keep the test readable.
  3. Assert structured outcomes.
  4. Use async tests for async code; do not spin real event loops manually.
  5. Cover negative paths for malformed packets, stale runtime state, and missing env.

Anti-Patterns

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.