pytest — тестирование Python-кода
testing
pytest is a Claude Code skill that establishes best practices for writing and organizing tests with pytest, covering fixtures, parametrize, markers, and plugins. It defines a tests/ directory structure that mirrors source layout, naming conventions for files and functions, and rules for choosing fixture scope and placing shared fixtures in conftest.py. For data-driven scenarios, the skill recommends @pytest.mark.parametrize with explicit ids; for exception testing, pytest.raises with a match pattern; for floating-point comparisons, pytest.approx. Common plugins addressed include pytest-cov, pytest-mock, pytest-asyncio, pytest-xdist, and pytest-timeout. Ideal for Python developers building reliable test suites who want to avoid pitfalls like inter-test dependencies, mutable session-scoped state, and assertions tied to implementation details rather than observable behavior.
- #pytest
- #testing
- #fixtures
- #parametrize
- #test-automation
- #python-testing