Explore battle-tested techniques to enhance the maintainability of your Python test suite in this 30-minute conference talk from EuroPython 2024. Delve into well-known patterns like the test client and transaction-bound tests, and learn how to extend these practices within pytest. Discover the utility of fixture factories for streamlining test data setup, and master effective mocking strategies without relying on monkey patching. Uncover the power of combining pytest fixtures with parametrized tests to build more comprehensive test scenarios. Examine an alternative approach to test categorization that better aligns with real-world scenarios, moving beyond the traditional unit and integration test division. Gain insights on creating a trustworthy test suite that goes beyond merely reporting higher coverage, empowering you to focus on what truly matters in Python application testing.
Overview
Syllabus
Pytest Design Patterns — Miloslav Pojman
Taught by
EuroPython Conference