Hypothesis

Latest version: v6.100.1

Safety actively analyzes 621332 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 60 of 195

6.6.0

------------------

This release makes it an explicit error to apply :func:`~hypothesis.stateful.invariant`
to a :func:`~hypothesis.stateful.rule` or :func:`~hypothesis.stateful.initialize` rule
in :doc:`stateful testing <stateful>`. Such a combination had unclear semantics,
especially in combination with :func:`~hypothesis.stateful.precondition`, and was never
meant to be allowed (:issue:`2681`).

6.5.0

------------------

This release adds :ref:`the explain phase <phases>`, in which Hypothesis
attempts to explain *why* your test failed by pointing to suspicious lines
of code (i.e. those which were always, and only, run on failing inputs).
We plan to include "generalising" failing examples in this phase in a
future release (:issue:`2192`).

6.4.3

------------------

This patch fixes :issue:`2794`, where nesting :func:`~hypothesis.strategies.deferred`
strategies within :func:`~hypothesis.strategies.recursive` strategies could
trigger an internal assertion. While it was always possible to get the same
results from a more sensible strategy, the convoluted form now works too.

6.4.2

------------------

This patch fixes several problems with ``mypy`` when `--no-implicit-reexport <https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport>`_ was activated in user projects.

Thanks to Nikita Sobolev for fixing :issue:`2884`!

6.4.1

------------------

This patch fixes an exception that occurs when using type unions of
the :pypi:`typing_extensions` ``Literal`` backport on Python 3.6.

Thanks to Ben Anhalt for identifying and fixing this bug.

6.4.0

------------------

This release fixes :doc:`stateful testing methods <stateful>` with multiple
:func:`~hypothesis.stateful.precondition` decorators. Previously, only the
outer-most precondition was checked (:issue:`2681`).

Page 60 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.