pytest-testing-assistant

Pytest Testing Assistant

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pytest-testing-assistant" with this command: npx skills add dmitriiweb/extract-emails/dmitriiweb-extract-emails-pytest-testing-assistant

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

Identify behavior

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

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.

Assertions

  • Prefer one main assertion; add secondary checks only when they clarify the outcome.

  • Include helpful assertion messages or use expressive matchers for readability.

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.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

google-docstring-assistant

No summary provided by upstream source.

Repository SourceNeeds Review
General

format-lint-assistant

No summary provided by upstream source.

Repository SourceNeeds Review
General

uv-package-management-assistant

No summary provided by upstream source.

Repository SourceNeeds Review