Pytest Async Testing Purpose Async testing requires special handling of event loops, context managers, and async fixtures. This skill provides production-ready patterns for testing all async scenarios in modern Python. Quick Start Configure pytest for auto-detection of async tests: Then write async tests naturally: Instructions Step 1: Configure pytest-asyncio in pyproject.toml Step 2: Create Async Fixtures Step 3: Use AsyncMock for Mocking Async Methods Step 4: Test Async Use Cases Step 5: Test FastAPI Endpoints with AsyncClient Step 6: Test Async Context Managers Step 7: Test Async Generato…