Hypothesis

Latest version: v6.99.13

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

Scan your dependencies

Page 164 of 194

3.38.4

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

This release updates the reported :ref:`statistics <statistics>` so that they
show approximately what fraction of your test run time is spent in data
generation (as opposed to test execution).

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

3.38.3

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

This is a documentation release, which ensures code examples are up to date
by running them as doctests in CI (:issue:`711`).

3.38.2

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

This release changes the behaviour of the :attr:`~hypothesis.settings.deadline`
setting when used with :func:`~hypothesis.strategies.data`: Time spent inside
calls to ``data.draw`` will no longer be counted towards the deadline time.

As a side effect of some refactoring required for this work, the way flaky
tests are handled has changed slightly. You are unlikely to see much difference
from this, but some error messages will have changed.

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

3.38.1

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

This patch has a variety of non-user-visible refactorings, removing various
minor warts ranging from indirect imports to typos in comments.

3.38.0

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

This release overhauls :ref:`the health check system <healthchecks>`
in a variety of small ways.
It adds no new features, but is nevertheless a minor release because it changes
which tests are likely to fail health checks.

The most noticeable effect is that some tests that used to fail health checks
will now pass, and some that used to pass will fail. These should all be
improvements in accuracy. In particular:

* New failures will usually be because they are now taking into account things
like use of :func:`~hypothesis.strategies.data` and
:func:`~hypothesis.assume` inside the test body.
* New failures *may* also be because for some classes of example the way data
generation performance was measured was artificially faster than real data
generation (for most examples that are hitting performance health checks the
opposite should be the case).
* Tests that used to fail health checks and now pass do so because the health
check system used to run in a way that was subtly different than the main
Hypothesis data generation and lacked some of its support for e.g. large
examples.

If your data generation is especially slow, you may also see your tests get
somewhat faster, as there is no longer a separate health check phase. This will
be particularly noticeable when rerunning test failures.

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

3.37.0

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

This is a deprecation release for some health check related features.

The following are now deprecated:

* Passing ``HealthCheck.exception_in_generation`` to
:attr:`~hypothesis.settings.suppress_health_check`. This no longer does
anything even when passed - All errors that occur during data generation
will now be immediately reraised rather than going through the health check
mechanism.
* Passing ``HealthCheck.random_module`` to
:attr:`~hypothesis.settings.suppress_health_check`. This hasn't done anything
for a long time, but was never explicitly deprecated. Hypothesis always seeds
the random module when running :func:`given <hypothesis.given>` tests, so this
is no longer an error and suppressing it doesn't do anything.
* Passing non-:class:`~hypothesis.HealthCheck` values in
:attr:`~hypothesis.settings.suppress_health_check`. This was previously
allowed but never did anything useful.

In addition, passing a non-iterable value as :attr:`~hypothesis.settings.suppress_health_check`
will now raise an error immediately (it would never have worked correctly, but
it would previously have failed later). Some validation error messages have
also been updated.

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

Page 164 of 194

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.