What problem does it solve?
This Skill ensures that all tests in the Polibase project adhere to strict quality standards, preventing flaky tests, CI/CD failures, and unnecessary API costs. It guides developers through best practices like Test-Driven Development (TDD), proper mocking, and async testing, significantly reducing debugging time.
Core Features & Use Cases
- TDD Workflow Guidance: Promotes a "Red-Green-Refactor" cycle, ensuring tests are written before implementation.
- Critical Mocking Enforcement: Strictly forbids real external API calls in tests, enforcing
AsyncMock with spec= to guarantee test isolation and determinism.
- Async Test Best Practices: Guides on using
pytest-asyncio for asynchronous code, preventing common pitfalls.
- Use Case: When you're developing a new feature, this skill helps you write the initial failing test, then guides you to implement just enough code to pass it, and finally assists in refactoring, ensuring your code is robust and well-tested from the start.
Quick Start
I need to write a new unit test for the CreatePoliticianUseCase. Guide me through the TDD workflow and ensure I mock all external dependencies correctly.