Reviews pytest test code for async patterns, fixtures, parametrize, and mocking. Use when reviewing test_*.py files, checking async test functions, fixture u...
Work in order. Do not assert pytest-specific problems until each applicable gate passes.
Scoped files — Pass when: You list every test_*.py and any conftest.py you will cite; no findings for files outside that list.
Async vs sync — Pass when: Per scoped file, you note whether it uses async def test_* / await; if yes, open references/async-testing.md before criticizing async usage.
Fixtures — Pass 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.
patch / mocks — Pass 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.
Findings — Pass 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