Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 174 of 195

3.18.4

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

Release to fix a bug where mocks can be used as test runners under certain
conditions. Specifically, if a mock is injected into a test via pytest
fixtures or patch decorators, and that mock is the first argument in the
list, hypothesis will think it represents self and turns the mock
into a test runner. If this happens, the affected test always passes
because the mock is executed instead of the test body. Sometimes, it
will also fail health checks.

Fixes :issue:`491` and a section of :issue:`198`.
Thanks to Ben Peterson for this bug fix.

3.18.3

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

This release should improve the performance of some tests which
experienced a slow down as a result of the :ref:`3.13.0 <v3.13.0>` release.

Tests most likely to benefit from this are ones that make extensive
use of ``min_size`` parameters, but others may see some improvement
as well.

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

Page 174 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.