Hypothesis

Latest version: v6.103.0

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

Scan your dependencies

Page 177 of 197

3.18.2

Not secure
-------------------

This release fixes a bug introduced in :ref:`3.18.0 <v3.18.0>`. If the arguments
``include_characters`` and ``exclude_characters`` to
:func:`~hypothesis.strategies.characters` contained overlapping elements, then an
``InvalidArgument`` exception would be raised.

Thanks to Zac Hatfield-Dodds for reporting and fixing this.

3.18.1

Not secure
-------------------

This is a bug fix release to fix :issue:`780`, where
:func:`~hypothesis.strategies.sets` and similar would trigger health check
errors if their element strategy could only produce one element (e.g.
if it was :func:`~hypothesis.strategies.just`).

3.18.0

Not secure
-------------------

This is a feature release:

* :func:`~hypothesis.strategies.characters` now accepts
``include_characters``, particular characters which will be added to those
it produces. (:issue:`668`)
* A bug fix for the internal function ``_union_interval_lists()``, and a rename
to ``_union_intervals()``. It now correctly handles all cases where intervals
overlap, and it always returns the result as a tuple for tuples.

Thanks to Alex Willmer for these.

3.17.0

Not secure
-------------------

This release documents :ref:`the previously undocumented phases feature <phases>`,
making it part of the public API. It also updates how the example
database is used. Principally:

* The :obj:`~hypothesis.Phase.reuse` phase will now correctly control whether examples
from the database are run (it previously did exactly the wrong thing and
controlled whether examples would be *saved*).
* Hypothesis will no longer try to rerun *all* previously failing examples.
Instead it will replay the smallest previously failing example and a
selection of other examples that are likely to trigger any other bugs that
will found. This prevents a previous failure from dominating your tests
unnecessarily.
* As a result of the previous change, Hypothesis will be slower about clearing
out old examples from the database that are no longer failing (because it can
only clear out ones that it actually runs).

3.16.1

Not secure
-------------------

This release makes an implementation change to how Hypothesis handles certain
internal constructs.

The main effect you should see is improvement to the behaviour and performance
of collection types, especially ones with a ``min_size`` parameter. Many cases
that would previously fail due to being unable to generate enough valid
examples will now succeed, and other cases should run slightly faster.

3.16.0

Not secure
-------------------

This release introduces a deprecation of the timeout feature. This results in
the following changes:

* Creating a settings object with an explicit timeout will emit a deprecation
warning.
* If your test stops because it hits the timeout (and has not found a bug) then
it will emit a deprecation warning.
* There is a new value ``unlimited`` which you can import from hypothesis.
``settings(timeout=unlimited)`` will *not* cause a deprecation warning.
* There is a new health check, ``hung_test``, which will trigger after a test
has been running for five minutes if it is not suppressed.

Page 177 of 197

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.