A testing conundrum

· Ned Batchelder · Dec. 18, 2025, 5:03 p.m.
Summary
The blog post explores the design and testing of a `Hasher` class for computing fingerprints of Python data structures. It details the implementation of the class, the logic behind hashing nested structures, and the acknowledgment of potential issues in equality checks. Furthermore, it discusses transitioning to property-based testing using the Hypothesis library for more robust tests, while reflecting on the challenges of capturing code intent in assertions.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →
BLOG POST FEATURED ON

Add this plugin to your blog