Contribute Media
A thank you to everyone who makes this possible: Read More

Test Research Code the Easy Way: By Generating Random Inputs with Hypothesis

Description

Writing correct software is difficult, and even scientists don’t always get it right. Hypothesis is a testing package that will search for counterexamples to your assertions – so you can write tests that provide a high-level description of your code or system, and let the computer attempt a Popperian falsification. If it fails, your code is (probably) OK… and if it succeeds you have a minimal input to debug. Come along and learn the principles of property-based testing, how to use Hypothesis, and how to use it to check scientific code – whether highly-polished or quick-and-dirty!

Details

Improve this page