You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
CI on behalf of the Hypothesis team 45b6484d29 Bump hypothesis-python version to 6.54.3 and update changelog 7 days ago
.github/workflows Test current Django versions 2 weeks ago
HypothesisWorks.github.io Update test names 2 months ago
brand Follows up on #2595 from @Julian-O, resizes svg to be 150 px wide so it is smaller. 2 years ago
conjecture-rust Closes #3061 (#3062) 1 year ago
guides Add support + docs for running individual tests 4 months ago
hypothesis-python Bump hypothesis-python version to 6.54.3 and update changelog 7 days ago
hypothesis-ruby Bump hypothesis-ruby version to 0.7.1 and update changelog 1 year ago
notebooks Final table 7 years ago
requirements Update pinned dependencies 3 weeks ago
scripts Delete Python2-only tests 3 years ago
tooling Test current Django versions 2 weeks ago
whole-repo-tests Improve functions() annotations 2 months ago
.flake8 Enable new lint checks 11 months ago
.gitattributes Preclude .jpg, .png, .gif being rewritten on git push 3 years ago
.gitignore Remove website gitattributes, merge .gitignore 4 months ago
.readthedocs.yml Python 3.8 is now available on readthedocs 3 years ago
AUTHORS.rst Merge pull request #3419 from ajcerejeira/ajcerejeira/django-username-field 4 weeks ago
CITATION.cff Use GitHub's citation file 1 year ago
CODEOWNERS Trivial refactorings 1 year ago
CODE_OF_CONDUCT.rst Remove documentation references to freenode IRC 4 months ago
CONTRIBUTING.rst change requirement file type 4 months ago
LICENSE.txt Use https:// URLs in docs and comments where available 4 years ago
Makefile Fix typo 4 years ago
README.rst Revert "Declare Hypothesis for Ruby unsupported" 2 years ago
build.sh Reduce tooling redundancy 4 months ago
mypy.ini Improve internal type annotations 2 months ago
paper.bib fixing missing letter 3 years ago
paper.md Improve wording of paper 3 years ago
pytest.ini Silence upstream warnings 4 months ago

README.rst

Hypothesis

Hypothesis is a family of testing libraries which let you write tests parametrized by a source of examples. A Hypothesis implementation then generates simple and comprehensible examples that make your tests fail. This simplifies writing your tests and makes them more powerful at the same time, by letting software automate the boring bits and do them to a higher standard than a human would, freeing you to focus on the higher level test logic.

This sort of testing is often called "property-based testing", and the most widely known implementation of the concept is the Haskell library QuickCheck, but Hypothesis differs significantly from QuickCheck and is designed to fit idiomatically and easily into existing styles of testing that you are used to, with absolutely no familiarity with Haskell or functional programming needed.

Hypothesis for Python is the original implementation, and the only one that is currently fully production ready and actively maintained.

Hypothesis for Other Languages

The core ideas of Hypothesis are language agnostic and in principle it is suitable for any language. We are interested in developing and supporting implementations for a wide variety of languages, but currently lack the resources to do so, so our porting efforts are mostly prototypes.

The two prototype implementations of Hypothesis for other languages are:

  • Hypothesis for Ruby is a reasonable start on a port of Hypothesis to Ruby.
  • Hypothesis for Java is a prototype written some time ago. It's far from feature complete and is not under active development, but was intended to prove the viability of the concept.

Additionally there is a port of the core engine of Hypothesis, Conjecture, to Rust. It is not feature complete but in the long run we are hoping to move much of the existing functionality to Rust and rebuild Hypothesis for Python on top of it, greatly lowering the porting effort to other languages.

Any or all of these could be turned into full fledged implementations with relatively little effort (no more than a few months of full time work), but as well as the initial work this would require someone prepared to provide or fund ongoing maintenance efforts for them in order to be viable.