Property-Based Testing Middle Ground

Formal methods with Hillel Wayne

Topic 13 of 17

Published Jul 29, 2026 · Clip 1:01:24–1:05:27 (4:04)

Hillel demos property-based testing in Python with Hypothesis on the max function: given any list of integers, the maximum must be in the list and greater than or equal to all others. It catches the bad max-of-first-three implementation with a failing list, tries many edge cases first (empty, tiny, huge lists), and shrinks failing inputs to the minimal interesting example, making bugs comprehensible. He positions property-based testing as generating a thousand random cases against a spec—less thorough than formal verification but much easier to apply, and useful for more people.