Hypothesis
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
What Hypothesis is
Hypothesis is a property-based testing library for Python. Tests describe a range of inputs and state properties that should hold for every input in it. Hypothesis then picks inputs from that range at random, including edge cases. Input ranges are declared with strategies passed to the @given decorator. When a test fails, Hypothesis reports the simplest failing example it finds instead of an arbitrary one. The package installs with pip, and optional extras are available.
Written from the project's README, read , and its documentation (see sources).
- Category
- Unit testing and test runners
- License
- MPL-2.0
- Language
- Python
- Changelog
- Releases on GitHub
Repository metrics
Status
activeLast commit within 90 days of the fetch date.Computed from the last commit date and the archive flag on the fetch date. See the status rules.
Alternatives
Listed unit testing and test runners tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from Hypothesis's, with its source.
pytest: Languages for writing tests: Python (3.10+ or PyPy3). source: README
Jest: Languages for writing tests: JavaScript; TypeScript via Babel or ts-jest. source: README
GoogleTest: Languages for writing tests: C++ (the 1.18.x branch requires C++17). source: README
Testify: Languages for writing tests: Go. source: README
Mocha: Languages for writing tests: JavaScript; TypeScript through Node.js type stripping or a loader such as tsx. source: Docs: TypeScript
Catch2: Languages for writing tests: C++. source: README
AVA: Languages for writing tests: JavaScript on Node.js; TypeScript definitions included. source: README
PHPUnit: Languages for writing tests: PHP. source: README
How to install
pip install hypothesisQuestions
Is Hypothesis open source?
Yes. Hypothesis is released under MPL-2.0, an OSI-approved license, as reported by the GitHub API on 2026-09-22.
Is Hypothesis maintained?
On 2026-09-22, the last commit to the default branch was on 2026-09-08, so the listed status is active. Rule: Last commit within 90 days of the fetch date.
How many GitHub stars does Hypothesis have?
9,003 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.
What language is Hypothesis written in?
The repository's primary language, as reported by the GitHub API, is Python.
How do I install Hypothesis?
The README gives this command: pip install hypothesis
Sources
- GitHub REST API: repository, read
- GitHub REST API: commits, read
- GitHub REST API: latest release, read
- GitHub REST API: contributors, read
- LICENSE file, read
- README, read