smithery.ai

pytest-testing-assistant

Write focused pytest tests as standalone functions (one test per function), avoiding test classes.

First seen Mar 30, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,573 B
  • docs SUMMARY.md 130 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Pytest Testing Assistant

Quick start

  • Write tests as plain functions; do not use test classes. Aim for one focused test per function/behavior.
  • Use clear names: test<function><behavior>; keep AAA (arrange/act/assert) obvious.
  • Prefer one primary assertion per test; add minimal supporting checks when necessary.
  • Use fixtures sparingly to keep tests readable; favor in-test setup when simple.
  • Run with pytest or pytest path/to/test_file.py to scope runs.
  • See references/pytest_rules.md for detailed guidelines and examples.

Workflow

  1. Identify behavior

- Target a single function/behavior per test. Name the test after the behavior being validated.

  1. Write the test

- Use a standalone function def test_<thing>(): (no classes). - Keep a clear arrange/act/assert structure; avoid hidden work in fixtures unless it improves clarity. - Use parametrization for small input/output matrices instead of loops.

  1. Assertions

- Prefer one main assertion; add secondary checks only when they clarify the outcome. - Include helpful assertion messages or use expressive matchers for readability.

  1. Run and iterate

- Run pytest (optionally narrow with paths or -k expressions). - Refine names and setup for readability and isolation.

Reference

  • references/pytest_rules.md: structure rules, naming patterns, and usage tips.