Software EngineeringOpen accessPublished 3 Oct 2026
pytest testing patterns for any Python project: test structure, fixtures, parametrize, conftest.py, monkeypatch, tmp_path, markers, unittest.mock (MagicMock, patch), pytest-cov coverage, and best practices. Stack-agnostic — referenced by every Python plugin in the marketplace.
Use this skill to:
- Organise tests with conftest.py shared fixtures and a clear test/src layout.
- Write parametrized tests to cover multiple inputs without duplication.
- Mock external dependencies (HTTP, DB, filesystem) with unittest.mock and monkeypatch.
- Measure and enforce code coverage with pytest-cov.
Do NOT use this skill for:
- Framework-specific test types (Django TestCase / WebTestCas…