/tests-class

Primary LanguageJupyter Notebook

This class covers the basics of testing with PyTest. Why testing is a good idea, how to find tests, and how to use tests as documentation. The first half of the class is a fast tour of these ideas and tools, and the second is a group exercise using the gilded rose kata.

Get an runnable version of this code with Binder!
Binder

Additional resources on testing

  1. Measure how many lines you are testing with Coverage.py.
  2. Generate tests with property based testing using Hypothesis
  3. Hillel Wayne's blog covers advanced testing strategies.