Hypothesis

Latest version: v6.99.13

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

Scan your dependencies

Page 168 of 194

3.30.3

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

This release fixes some formatting and small typos/grammar issues in the
documentation, specifically the page docs/details.rst, and some inline
docs linked from there.

3.30.2

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

This release changes Hypothesis's caching approach for functions in
``hypothesis.strategies``. Previously it would have cached extremely
aggressively and cache entries would never be evicted. Now it adopts a
least-frequently used, least recently used key invalidation policy, and is
somewhat more conservative about which strategies it caches.

Workloads which create strategies based on dynamic values, e.g. by using
:ref:`flatmap <flatmap>` or :func:`~hypothesis.strategies.composite`,
will use significantly less memory.

3.30.1

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

This release fixes a bug where when running with
the ``use_coverage=True`` setting inside an
existing running instance of coverage, Hypothesis would frequently put files
that the coveragerc excluded in the report for the enclosing coverage.

3.30.0

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

This release introduces two new features:

* When a test fails, either with a health check failure or a falsifying example,
Hypothesis will print out a seed that led to that failure, if the test is not
already running with a fixed seed. You can then recreate that failure using either
the :func:`seed <hypothesis.seed>` decorator or (if you are running pytest) with ``--hypothesis-seed``.
* :pypi:`pytest` users can specify a seed to use for :func:`given <hypothesis.given>` based tests by passing
the ``--hypothesis-seed`` command line argument.

This work was funded by `Smarkets <https://smarkets.com/>`_.

3.29.0

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

This release makes Hypothesis coverage aware. Hypothesis now runs all test
bodies under coverage, and uses this information to guide its testing.

The ``use_coverage`` setting can be used to disable
this behaviour if you want to test code that is sensitive to coverage being
enabled (either because of performance or interaction with the trace function).

The main benefits of this feature are:

* Hypothesis now observes when examples it discovers cover particular lines
or branches and stores them in the database for later.
* Hypothesis will make some use of this information to guide its exploration of
the search space and improve the examples it finds (this is currently used
only very lightly and will likely improve significantly in future releases).

This also has the following side-effects:

* Hypothesis now has an install time dependency on the :pypi:`coverage` package.
* Tests that are already running Hypothesis under coverage will likely get
faster.
* Tests that are not running under coverage now run their test bodies under
coverage by default.


This feature is only partially supported under pypy. It is significantly slower
than on CPython and is turned off by default as a result, but it should still
work correctly if you want to use it.

3.28.3

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

This release is an internal change that affects how Hypothesis handles
calculating certain properties of strategies.

The primary effect of this is that it fixes a bug where use of
:func:`~hypothesis.strategies.deferred` could sometimes trigger an internal assertion
error. However the fix for this bug involved some moderately deep changes to
how Hypothesis handles certain constructs so you may notice some additional
knock-on effects.

In particular the way Hypothesis handles drawing data from strategies that
cannot generate any values has changed to bail out sooner than it previously
did. This may speed up certain tests, but it is unlikely to make much of a
difference in practice for tests that were not already failing with
Unsatisfiable.

Page 168 of 194

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.