Files
prompts/docs/skills/pytest-scaffolding/references/pytest-docs.md
T
John Lancaster 3347443ca9 formatting
2026-06-19 01:29:05 -05:00

1.1 KiB

Pytest Documentation Notes

!!! info "Primary sources" - Good integration practices - Fixture how-to - Marker examples - Configuration reference - Flaky tests

Practical Guidance For This Skill

  • Use src-aligned test layout and keep test discovery conventional.
  • Keep fixtures small, composable, and explicit; use yield for teardown.
  • Register custom markers and keep strict marker validation on.
  • Separate quick unit runs from slower integration/external runs.
  • Minimize flakiness by controlling shared state and avoiding hidden dependencies.
  • Use --collect-only and marker-filtered runs to validate scaffold quality early.

Commands Worth Remembering

  • uv run pytest --collect-only -q
  • uv run pytest -m unit -q
  • uv run pytest -m "not external" -q
  • uv run pytest -q