Tutorial: Writing tests that write themselves
Code and slides for my Hypothesis tutorial at PyCon Canada 2017.
All dependencies needed are listed in
Was written for Python 2.7.12 but any version of 2.7 should work.
- Make sure you have
- Git clone this repo or download the zip file: https://github.com/dkua/hypothesis-tutorial/archive/master.zip
- Once cloned or unzipped, go into the
pip install -r requirements.txt
Running the exercises
Inside of the
pytest <exercise folder>
If you want to run with extra Hypothesis stats:
pytest --hypothesis-show-statistics <exercise folder>
Hypothesis documentation: http://hypothesis.readthedocs.io/
Hypothesis GitHub repo: https://github.com/HypothesisWorks/hypothesis-python/
The talk version of this tutorial from PyCon Canada 2016 is online at: https://www.youtube.com/watch?v=SQcCmCyuVyo
A copy of the QuickCheck paper can be found in this repo.