Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A library for property based testing

Project description

Hypothesis is an advanced testing library for Python. It lets you write tests which are parametrized by a source of examples, and then generates simple and comprehensible examples that make your tests fail. This lets you find more bugs in your code with less work.

e.g.

@given(st.lists(
  st.floats(allow_nan=False, allow_infinity=False), min_size=1))
def test_mean(xs):
    assert min(xs) <= mean(xs) <= max(xs)
Falsifying example: test_mean(
  xs=[1.7976321109618856e+308, 6.102390043022755e+303]
)

Hypothesis is extremely practical and advances the state of the art of unit testing by some way. It’s easy to use, stable, and powerful. If you’re not using Hypothesis to test your project then you’re missing out.

Quick Start/Installation

If you just want to get started:

pip install hypothesis

Project details


Release history Release notifications

This version
History Node

3.60.1

History Node

3.60.0

History Node

3.59.3

History Node

3.59.2

History Node

3.59.1

History Node

3.59.0

History Node

3.58.1

History Node

3.58.0

History Node

3.57.0

History Node

3.56.10

History Node

3.56.9

History Node

3.56.8

History Node

3.56.7

History Node

3.56.6

History Node

3.56.5

History Node

3.56.4

History Node

3.56.3

History Node

3.56.2

History Node

3.56.1

History Node

3.56.0

History Node

3.55.6

History Node

3.55.5

History Node

3.55.4

History Node

3.55.3

History Node

3.55.2

History Node

3.55.1

History Node

3.55.0

History Node

3.54.0

History Node

3.53.0

History Node

3.52.3

History Node

3.52.2

History Node

3.52.1

History Node

3.52.0

History Node

3.51.0

History Node

3.50.3

History Node

3.50.2

History Node

3.50.1

History Node

3.50.0

History Node

3.49.1

History Node

3.49.0

History Node

3.48.1

History Node

3.48.0

History Node

3.47.0

History Node

3.46.2

History Node

3.46.1

History Node

3.46.0

History Node

3.45.5

History Node

3.45.4

History Node

3.45.3

History Node

3.45.2

History Node

3.45.1

History Node

3.45.0

History Node

3.44.26

History Node

3.44.25

History Node

3.44.24

History Node

3.44.23

History Node

3.44.22

History Node

3.44.21

History Node

3.44.20

History Node

3.44.19

History Node

3.44.18

History Node

3.44.16

History Node

3.44.15

History Node

3.44.14

History Node

3.44.13

History Node

3.44.12

History Node

3.44.11

History Node

3.44.10

History Node

3.44.9

History Node

3.44.8

History Node

3.44.7

History Node

3.44.6

History Node

3.44.5

History Node

3.44.4

History Node

3.44.3

History Node

3.44.2

History Node

3.44.1

History Node

3.44.0

History Node

3.43.1

History Node

3.43.0

History Node

3.42.2

History Node

3.42.1

History Node

3.42.0

History Node

3.41.0

History Node

3.40.1

History Node

3.40.0

History Node

3.39.0

History Node

3.38.9

History Node

3.38.8

History Node

3.38.7

History Node

3.38.6

History Node

3.38.5

History Node

3.38.4

History Node

3.38.3

History Node

3.38.2

History Node

3.38.1

History Node

3.38.0

History Node

3.37.0

History Node

3.36.1

History Node

3.36.0

History Node

3.35.0

History Node

3.34.1

History Node

3.34.0

History Node

3.33.1

History Node

3.33.0

History Node

3.32.2

History Node

3.32.1

History Node

3.32.0

History Node

3.31.6

History Node

3.31.5

History Node

3.31.4

History Node

3.31.3

History Node

3.31.2

History Node

3.31.1

History Node

3.31.0

History Node

3.30.4

History Node

3.30.3

History Node

3.30.2

History Node

3.30.1

History Node

3.30.0

History Node

3.29.0

History Node

3.28.3

History Node

3.28.2

History Node

3.28.1

History Node

3.28.0

History Node

3.27.1

History Node

3.27.0

History Node

3.26.0

History Node

3.25.1

History Node

3.25.0

History Node

3.24.2

History Node

3.24.1

History Node

3.24.0

History Node

3.23.3

History Node

3.23.2

History Node

3.23.1

History Node

3.23.0

History Node

3.22.2

History Node

3.22.1

History Node

3.22.0

History Node

3.21.3

History Node

3.21.2

History Node

3.21.1

History Node

3.21.0

History Node

3.20.0

History Node

3.19.3

History Node

3.19.2

History Node

3.19.1

History Node

3.19.0

History Node

3.18.5

History Node

3.18.4

History Node

3.18.3

History Node

3.18.2

History Node

3.18.1

History Node

3.18.0

History Node

3.17.0

History Node

3.16.1

History Node

3.16.0

History Node

3.15.0

History Node

3.14.2

History Node

3.14.1

History Node

3.14.0

History Node

3.13.1

History Node

3.13.0

History Node

3.12.0

History Node

3.11.6

History Node

3.11.5

History Node

3.11.4

History Node

3.11.3

History Node

3.11.2

History Node

3.11.1

History Node

3.11.0

History Node

3.10.0

History Node

3.9.1

History Node

3.9.0

History Node

3.8.5

History Node

3.8.4

History Node

3.8.3

History Node

3.8.2

History Node

3.8.1

History Node

3.8.0

History Node

3.7.4

History Node

3.7.3

History Node

3.7.2

History Node

3.7.1

History Node

3.7.0

History Node

3.6.1

History Node

3.6.0

History Node

3.5.3

History Node

3.5.2

History Node

3.5.1

History Node

3.5.0

History Node

3.4.2

History Node

3.4.1

History Node

3.4.0

History Node

3.3.0

History Node

3.2.0

History Node

3.1.3

History Node

3.1.2

History Node

3.1.1

History Node

3.1.0

History Node

3.0.5

History Node

3.0.4

History Node

3.0.3

History Node

3.0.2

History Node

3.0.1

History Node

3.0.0

History Node

2.0.0

History Node

1.19.0

History Node

1.18.1

History Node

1.18.0

History Node

1.17.1

History Node

1.17.0

History Node

1.16.0

History Node

1.15.0

History Node

1.14.0

History Node

1.13.0

History Node

1.12.0

History Node

1.11.4

History Node

1.11.3

History Node

1.11.2

History Node

1.11.1

History Node

1.11.0

History Node

1.10.6

History Node

1.10.5

History Node

1.10.4

History Node

1.10.3

History Node

1.10.2

History Node

1.10.1

History Node

1.10.0

History Node

1.9.0

History Node

1.8.5

History Node

1.8.4

History Node

1.8.3

History Node

1.8.2

History Node

1.8.1

History Node

1.8.0

History Node

1.7.2

History Node

1.7.1

History Node

1.6.2

History Node

1.6.1

History Node

1.6.0

History Node

1.5.0

History Node

1.4.1

History Node

1.4.0

History Node

1.3.0

History Node

1.2.1

History Node

1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.0

History Node

0.9.2

History Node

0.9.1

History Node

0.9.0

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.0

History Node

0.5.0

History Node

0.4.3

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
hypothesis-3.60.1-py2-none-any.whl (210.0 kB) Copy SHA256 hash SHA256 Wheel py2 Jun 22, 2018
hypothesis-3.60.1-py3-none-any.whl (209.9 kB) Copy SHA256 hash SHA256 Wheel py3 Jun 22, 2018
hypothesis-3.60.1.tar.gz (158.6 kB) Copy SHA256 hash SHA256 Source None Jun 20, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page