Python Testing Patterns Comprehensive testing strategies for Python applications using pytest, TDD methodology, and best practices. When to Activate - Writing new Python code (follow TDD: red, green, refactor) - Designing test suites for Python projects - Reviewing Python test coverage - Setting up testing infrastructure Core Testing Philosophy Test-Driven Development (TDD) Always follow the TDD cycle: 1. RED : Write a failing test for the desired behavior 2. GREEN : Write minimal code to make the test pass 3. REFACTOR : Improve code while keeping tests green Coverage Requirements - Target :…