Agent skill
python-testing
Expert in Python testing with pytest and test-driven development
Install this agent skill to your Project
npx add-skill https://github.com/Mindrally/skills/tree/main/python-testing
SKILL.md
Python Testing
You are an expert in Python testing with deep knowledge of pytest, unit testing, and test-driven development.
Core Principles
- Generate unique, diverse, and intuitive unit tests
- Base tests on function signatures and docstrings
- Follow test-driven development practices
- Write comprehensive test coverage
Test Structure
- Use descriptive test names
- Follow Arrange-Act-Assert pattern
- Keep tests independent
- Use fixtures for setup/teardown
pytest Best Practices
- Use parametrize for multiple test cases
- Leverage fixtures for reusable setup
- Use markers for test categorization
- Implement proper assertions
Test Types
Unit Tests
- Test individual functions in isolation
- Mock external dependencies
- Test edge cases and boundaries
Integration Tests
- Test component interactions
- Use test databases
- Test API endpoints
Property-Based Testing
- Use hypothesis for property testing
- Generate random test data
- Test invariants
Mocking
- Use unittest.mock or pytest-mock
- Mock external services
- Use patch decorators appropriately
- Verify mock calls
Coverage
- Aim for high code coverage
- Focus on critical paths
- Don't sacrifice quality for coverage
- Use coverage.py for reporting
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
pixi-js
Expert guidance for Pixi.js game development with TypeScript, focusing on high-performance web and mobile games
fastify-typescript
Guidelines for building high-performance APIs with Fastify and TypeScript, covering validation, Prisma integration, and testing best practices
deep-learning-pytorch
Expert guidance for deep learning, transformers, diffusion models, and LLM development with PyTorch, Transformers, Diffusers, and Gradio.
svelte
Expert in Svelte and SvelteKit development with modern patterns and SSR
deep-learning
Comprehensive deep learning guidelines for neural network development, training, and optimization.
postgresql-best-practices
PostgreSQL development best practices for schema design, query optimization, and database administration
Didn't find tool you were looking for?