Getting started with property-based testing in Python with hypothesis and Pytest
I&#x27;ve always liked this concept, but I&#x27;ve only ever seen it demonstrated with simple pure functions like <i>gcd</i> and <i>sort</i>. How practical is generating inputs for <i>payroll_get_benefits_adjustment(org, employee, jurisdiction, period, *args, **kwargs)</i>?<p>If I have to teach Hypothesis (by writing strategies) which pieces of these complex values matter and which combinations of those pieces are needed to cover the space, is it still worth it? Am I chopping up essential complexity and pushing it around, or am I gaining coverage? Brevity? Clarity? Correctness? A promotion?<p>Will it hit the database a hundred extra times to cover combinations that don&#x27;t matter when I could have just enumerated ones that do?<p>Will the next maintainer know if tests <i>aren&#x27;t</i> failing when they should because my primer to Hypothesis was subtly wrong?