Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
existential-birds avatar

Pytest Code Review

  • 199 installs
  • 74 repo stars
  • Updated July 21, 2026
  • existential-birds/beagle

Review pytest suites for flaky patterns, poor fixtures, missing parametrization, assertion quality, and coverage gaps before merge.

About

Pytest-focused code review skill auditing fixtures, parametrization, markers, mocking boundaries, assertion clarity, and test isolation to prevent flaky suites and improve long-term maintainability of Python test code.

  • Fixture hygiene
  • Flaky test detection
  • Parametrize usage
  • Assertion quality
  • Isolation checks

Pytest Code Review by the numbers

  • 199 all-time installs (skills.sh)
  • Ranked #806 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/existential-birds/beagle --skill pytest-code-review

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs199
repo stars74
Last updatedJuly 21, 2026
Repositoryexistential-birds/beagle

What it does

Review pytest suites for flaky patterns, poor fixtures, missing parametrization, assertion quality, and coverage gaps before merge.

Files

SKILL.mdMarkdownGitHub ↗

Pytest Code Review

Quick Reference

Issue TypeReference
async def test_*, AsyncMock, await patternsreferences/async-testing.md
conftest.py, factory fixtures, scope, cleanupreferences/fixtures.md
@pytest.mark.parametrize, DRY patternsreferences/parametrize.md
AsyncMock tracking, patch patterns, when to mockreferences/mocking.md

Review gates

Work in order. Do not assert pytest-specific problems until each applicable gate passes.

1. Scoped filesPass when: You list every test_*.py and any conftest.py you will cite; no findings for files outside that list. 2. Async vs syncPass when: Per scoped file, you note whether it uses async def test_* / await; if yes, open references/async-testing.md before criticizing async usage. 3. FixturesPass when: If shared setup matters, you name the conftest.py path(s) or state none; for yield fixtures, confirm cleanup exists before claiming resource leaks. 4. patch / mocksPass when: For any patch or mock critique, you give the import path where the symbol is used (call site), or mark N/A; open references/mocking.md when mocking is central to the review. 5. FindingsPass when: Each finding includes a file path and line(s) or test node id, not a generic rule restatement.

Review Checklist

  • [ ] Test functions are async def test_* for async code under test
  • [ ] AsyncMock used for async dependencies, not Mock
  • [ ] All async mocks and coroutines are awaited
  • [ ] Fixtures in conftest.py for shared setup
  • [ ] Fixture scope appropriate (function, class, module, session)
  • [ ] Yield fixtures have proper cleanup in finally block
  • [ ] @pytest.mark.parametrize for similar test cases
  • [ ] No duplicated test logic across multiple test functions
  • [ ] Mocks track calls properly (assert_called_once_with)
  • [ ] patch() targets correct location (where used, not defined)
  • [ ] No mocking of internals that should be tested
  • [ ] Test isolation (no shared mutable state between tests)

When to Load References

  • Reviewing async test functions → async-testing.md
  • Reviewing fixtures or conftest.py → fixtures.md
  • Reviewing similar test cases → parametrize.md
  • Reviewing mocks and patches → mocking.md

Review Questions

1. Are all async functions tested with async def test_*? 2. Are fixtures properly scoped with appropriate cleanup? 3. Can similar test cases be parametrized to reduce duplication? 4. Are mocks tracking calls and used at the right locations?

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.