hypothesis


Namehypothesis JSON
Version 6.100.0 PyPI version JSON
download
home_pagehttps://hypothesis.works
SummaryA library for property-based testing
upload_time2024-03-31 22:30:15
maintainerNone
docs_urlNone
authorDavid R. MacIver and Zac Hatfield-Dodds
requires_python>=3.8
licenseMPL-2.0
keywords python testing fuzzing property-based-testing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==========
Hypothesis
==========

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.

.. code-block:: python

  @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)

.. code-block::

  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:

.. code-block::

  pip install hypothesis


-----------------
Links of interest
-----------------

The main Hypothesis site is at `hypothesis.works <https://hypothesis.works/>`_, and contains a lot
of good introductory and explanatory material.

Extensive documentation and examples of usage are `available at readthedocs <https://hypothesis.readthedocs.io/en/latest/>`_.

If you want to talk to people about using Hypothesis, `we have both an IRC channel
and a mailing list <https://hypothesis.readthedocs.io/en/latest/community.html>`_.

If you want to receive occasional updates about Hypothesis, including useful tips and tricks, there's a
`TinyLetter mailing list to sign up for them <https://tinyletter.com/DRMacIver/>`_.

If you want to contribute to Hypothesis, `instructions are here <https://github.com/HypothesisWorks/hypothesis-python/blob/master/CONTRIBUTING.rst>`_.

If you want to hear from people who are already using Hypothesis, some of them `have written
about it <https://hypothesis.readthedocs.io/en/latest/endorsements.html>`_.

If you want to create a downstream package of Hypothesis, please read `these guidelines for packagers <https://hypothesis.readthedocs.io/en/latest/packaging.html>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "https://hypothesis.works",
    "name": "hypothesis",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "python testing fuzzing property-based-testing",
    "author": "David R. MacIver and Zac Hatfield-Dodds",
    "author_email": "david@drmaciver.com",
    "download_url": "https://files.pythonhosted.org/packages/fb/d9/65762008149d8d0d4cd11da2d112b025825f65034d39795016f084640c19/hypothesis-6.100.0.tar.gz",
    "platform": null,
    "description": "==========\nHypothesis\n==========\n\nHypothesis is an advanced testing library for Python. It lets you write tests which\nare parametrized by a source of examples, and then generates simple and comprehensible\nexamples that make your tests fail. This lets you find more bugs in your code with less\nwork.\n\ne.g.\n\n.. code-block:: python\n\n  @given(st.lists(st.floats(allow_nan=False, allow_infinity=False), min_size=1))\n  def test_mean(xs):\n      assert min(xs) <= mean(xs) <= max(xs)\n\n.. code-block::\n\n  Falsifying example: test_mean(\n    xs=[1.7976321109618856e+308, 6.102390043022755e+303]\n  )\n\nHypothesis is extremely practical and advances the state of the art of\nunit testing by some way. It's easy to use, stable, and powerful. If\nyou're not using Hypothesis to test your project then you're missing out.\n\n------------------------\nQuick Start/Installation\n------------------------\n\nIf you just want to get started:\n\n.. code-block::\n\n  pip install hypothesis\n\n\n-----------------\nLinks of interest\n-----------------\n\nThe main Hypothesis site is at `hypothesis.works <https://hypothesis.works/>`_, and contains a lot\nof good introductory and explanatory material.\n\nExtensive documentation and examples of usage are `available at readthedocs <https://hypothesis.readthedocs.io/en/latest/>`_.\n\nIf you want to talk to people about using Hypothesis, `we have both an IRC channel\nand a mailing list <https://hypothesis.readthedocs.io/en/latest/community.html>`_.\n\nIf you want to receive occasional updates about Hypothesis, including useful tips and tricks, there's a\n`TinyLetter mailing list to sign up for them <https://tinyletter.com/DRMacIver/>`_.\n\nIf you want to contribute to Hypothesis, `instructions are here <https://github.com/HypothesisWorks/hypothesis-python/blob/master/CONTRIBUTING.rst>`_.\n\nIf you want to hear from people who are already using Hypothesis, some of them `have written\nabout it <https://hypothesis.readthedocs.io/en/latest/endorsements.html>`_.\n\nIf you want to create a downstream package of Hypothesis, please read `these guidelines for packagers <https://hypothesis.readthedocs.io/en/latest/packaging.html>`_.\n",
    "bugtrack_url": null,
    "license": "MPL-2.0",
    "summary": "A library for property-based testing",
    "version": "6.100.0",
    "project_urls": {
        "Changelog": "https://hypothesis.readthedocs.io/en/latest/changes.html",
        "Documentation": "https://hypothesis.readthedocs.io",
        "Homepage": "https://hypothesis.works",
        "Issues": "https://github.com/HypothesisWorks/hypothesis/issues",
        "Source": "https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python"
    },
    "split_keywords": [
        "python",
        "testing",
        "fuzzing",
        "property-based-testing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ce8e37c3be898a1c966c1799abc6feab0f4e87519b4e338c78d35eaa97ea314",
                "md5": "6cf42410ce2e9ca51d760577fe963ea9",
                "sha256": "ceaeb7c051085dbec37f2fc4dca524b6304472ff1887fed53b3d84705507c10e"
            },
            "downloads": -1,
            "filename": "hypothesis-6.100.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6cf42410ce2e9ca51d760577fe963ea9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 458015,
            "upload_time": "2024-03-31T22:30:05",
            "upload_time_iso_8601": "2024-03-31T22:30:05.916211Z",
            "url": "https://files.pythonhosted.org/packages/9c/e8/e37c3be898a1c966c1799abc6feab0f4e87519b4e338c78d35eaa97ea314/hypothesis-6.100.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fbd965762008149d8d0d4cd11da2d112b025825f65034d39795016f084640c19",
                "md5": "70d36b1c8e888441c8c7f4c874d8cef0",
                "sha256": "1841f6b5083844cd4b66965e44a17c0dc8fe8e9c6370c1f7b8d50647fcb2efd3"
            },
            "downloads": -1,
            "filename": "hypothesis-6.100.0.tar.gz",
            "has_sig": false,
            "md5_digest": "70d36b1c8e888441c8c7f4c874d8cef0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 396848,
            "upload_time": "2024-03-31T22:30:15",
            "upload_time_iso_8601": "2024-03-31T22:30:15.076116Z",
            "url": "https://files.pythonhosted.org/packages/fb/d9/65762008149d8d0d4cd11da2d112b025825f65034d39795016f084640c19/hypothesis-6.100.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-31 22:30:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HypothesisWorks",
    "github_project": "hypothesis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hypothesis"
}
        
Elapsed time: 0.22046s