Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Explore snapshot testing as a revolutionary approach to improving test reliability and reducing manual testing overhead in this 30-minute conference talk from EuroPython 2025. Learn how snapshot testing simplifies the process of testing large result sets, particularly beneficial for API testing and data processing workflows. Discover the inline-snapshot library by Frank Hoffmann, a pytest plugin that transforms how Python developers write unit tests by automatically capturing and comparing function outputs. Master the main use cases including testing deterministic functions with large outputs that are difficult to write manually, and implementing refactor or approval testing to ensure consistent results during code changes. Examine real-world examples using popular tools like black, flake8, and ruff, along with practical applications using dirty-equals for flexible comparisons. Understand how to handle meaningful diffs, manage formatting and linting challenges, and deal with varying outputs across different library versions. Gain specific knowledge about when and where to implement inline-snapshot testing, particularly for data processing, data pipelining, and API development scenarios where large dictionaries or dataframes are common outputs.
Syllabus
Snapshot Testing: A New Era of Reliability — Matthieu Rigal
Taught by
EuroPython Conference