← Back to context

Comment by Jtsummers

18 hours ago

> because there is no counterexample shrinking

Hypothesis does shrink the examples, though.

And Hypothesis is miles ahead of QuickCheck in how it handles shrinking! Not only does it shrink automatically, it has no problem preserving invariants from generation in your shrinking; like only prime numbers or only strings that begin with a vowel etc.

  • QuickCheck also shrinks automatically and preserves invariants though?

    • No, QuickCheck very importantly does not shrink automatically. You have to write the shrinker yourself. Hypothesis, Hedgehog, proptest and a few others shrink automatically.

    • Yes, but instances require the user to provide shrinking while Hypothesis does not: shrinking is derived automatically.