
Python Bytes #470 A Jolting Episode
6 snips
Feb 23, 2026 Inline-snapshot testing for complex data lets tests store expected structures right in the test code. Jolt provides terminal battery intelligence with power, process tracking, and historical graphs for macOS and Linux. Ruff can format Python code blocks inside Markdown safely. Act lets you run GitHub Actions workflows locally using Docker for faster feedback.
AI Snips
Chapters
Transcript
Episode notes
Inline Snapshot Testing Keeps Expected Structures In Tests
- Snapshot testing embeds expected outputs directly into pytest tests using inline-snapshot so you can visually inspect expected complex data structures in-place.
- Run pytest with --inline-snapshot=fix to populate the inline dict, then run normally to compare against the collected snapshot for regression checks.
Always Review Updated Inline Snapshots
- When updating snapshots, always manually inspect the inline snapshot after running with --inline-snapshot=fix to avoid blindly accepting unintended changes.
- Brian warns that without inspection snapshots become mere change detectors rather than meaningful assertions.
Michael Shows Jolt Monitoring His MacBook
- Michael demonstrates Jolt running on his MacBook Air showing battery percent, time remaining, cycle count, temperature and real-time watt draw with CPU/GPU breakdown.
- He points out Vivaldi and other processes' energy impact and a moving graph of power and battery trends.
