Menü

PyGRAZ ist eine Usergroup mit die Python-Programmiersprache in Graz. Wir treffen uns regelmässig am ersten Dienstag im Monat entweder im realraum oder im Gösserbräu.

Session: Property-Based Testing with pytest & Hypothesis

von

Diese Session wurde am 3. März 2020 gehalten.

With Hypothesis you can easily add property-based/QuickCheck like testing to your existing pytest based test suite. Hypothesis provides various tools for generating test data automatically for your tests with the goal of breaking them and, if it succeeds, providing a simplified example input which is easy to work/debug with.

We are going to look at how to add Hypothesis to an existing test suite; how to generate various types of test data; how to write tests with it; how to write our own custom data generators and finally we are going to look at how various popular projects use Hypothesis in their test suites.

Comments powered by Disqus