Hypothesis (Python)
lastmod 2026-11-10created 2026-04-222 edits
Hypothesis is a property-based testing library for Python. Instead of writing specific input values directly, you describe the kinds of input with the @given decorator and strategies; the library then generates and runs a variety of values, and when a test fails it shrinks the input to the simplest one that reproduces the cause. Failing examples it finds are saved to a database and tried first on the next run. It is used together with pytest and unittest.
The property-based testing library for Python