Hypothesis

Latest version: v6.104.0

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

Scan your dependencies

Page 171 of 198

3.31.4

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

:func:`~hypothesis.strategies.from_type` failed with a very confusing error
if passed a :obj:`~typing.NewType` (:issue:`901`). These pseudo-types
are now unwrapped correctly, and strategy inference works as expected.

3.31.3

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

This release makes some small optimisations to our use of coverage that should
reduce constant per-example overhead. This is probably only noticeable on
examples where the test itself is quite fast. On no-op tests that don't test
anything you may see up to a fourfold speed increase (which is still
significantly slower than without coverage). On more realistic tests the speed
up is likely to be less than that.

3.31.2

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

This release fixes some formatting and small typos/grammar issues in the
documentation, specifically the page docs/settings.rst, and the inline docs
for the various settings.

3.31.1

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

This release improves the handling of deadlines so that they act better with
the shrinking process. This fixes :issue:`892`.

This involves two changes:

1. The deadline is raised during the initial generation and shrinking, and then
lowered to the set value for final replay. This restricts our attention to
examples which exceed the deadline by a more significant margin, which
increases their reliability.
2. When despite the above a test still becomes flaky because it is
significantly faster on rerun than it was on its first run, the error
message is now more explicit about the nature of this problem, and includes
both the initial test run time and the new test run time.

In addition, this release also clarifies the documentation of the deadline
setting slightly to be more explicit about where it applies.

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

3.31.0

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

This release blocks installation of Hypothesis on Python 3.3, which
:PEP:`reached its end of life date on 2017-09-29 <398>`.

This should not be of interest to anyone but downstream maintainers -
if you are affected, migrate to a secure version of Python as soon as
possible or at least seek commercial support.

3.30.4

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

This release makes several changes:

1. It significantly improves Hypothesis's ability to use coverage information
to find interesting examples.
2. It reduces the default :attr:`~hypothesis.settings.max_examples` setting from 200 to 100. This takes
advantage of the improved algorithm meaning fewer examples are typically
needed to get the same testing and is sufficiently better at covering
interesting behaviour, and offsets some of the performance problems of
running under coverage.
3. Hypothesis will always try to start its testing with an example that is near
minimized.

The new algorithm for 1 also makes some changes to Hypothesis's low level data
generation which apply even with coverage turned off. They generally reduce the
total amount of data generated, which should improve test performance somewhat.
Between this and 3 you should see a noticeable reduction in test runtime (how
much so depends on your tests and how much example size affects their
performance. On our benchmarks, where data generation dominates, we saw up to
a factor of two performance improvement, but it's unlikely to be that large.

Page 171 of 198

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.