News for hackers. Stuff that matters.
Re:Hypothesis: Property-Based Testing for Python by sunshowers on Wednesday November 05, 2025 @02:06AM (#45820167)
Speaking for myself — those are definitely all simpler cases, but for me I never found them compelling enough (beyond the "it doesn't crash" property). For me, the simplest case that truly motivated PBT for me was roundtrip serialization. Now I use PBT quite a lot, and most of them are either serialization roundtrip or oracle/model-based tests.
Re:Hypothesis: Property-Based Testing for Python by eru on Wednesday November 05, 2025 @03:25AM (#45820697)
Oh, yes, I was just listing simple examples. I wasn't trying to find a use case that's compelling enough to make you want to get started.

I got started out of curiosity, and because writing property based tests is a lot more fun than writing example based tests.