Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 169 of 210

3.52.3

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

This patch fixes the ``min_satisfying_examples`` settings
documentation, by explaining that example shrinking is tracked at the level
of the underlying bytestream rather than the output value.

The output from ``find()`` in verbose mode has also been
adjusted - see :ref:`the example session <verbose-output>` - to avoid
duplicating lines when the example repr is constant, even if the underlying
representation has been shrunken.

3.52.2

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

This release improves the output of failures with
:ref:`rule based stateful testing <rulebasedstateful>` in two ways:

* The output from it is now usually valid Python code.
* When the same value has two different names because it belongs to two different
bundles, it will now display with the name associated with the correct bundle
for a rule argument where it is used.

3.52.1

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

This release improves the behaviour of :doc:`stateful testing <stateful>`
in two ways:

* Previously some runs would run no steps (:issue:`376`). This should no longer
happen.
* RuleBasedStateMachine tests which used bundles extensively would often shrink
terribly. This should now be significantly improved, though there is likely
a lot more room for improvement.

This release also involves a low level change to how ranges of integers are
handles which may result in other improvements to shrink quality in some cases.

3.52.0

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

This release deprecates use of :func:`settings(...) <hypothesis.settings>`
as a decorator, on functions or methods that are not also decorated with
:func:`given <hypothesis.given>`. You can still apply these decorators
in any order, though you should only do so once each.

Applying :func:`given <hypothesis.given>` twice was already deprecated, and
applying :func:`settings(...) <hypothesis.settings>` twice is deprecated in
this release and will become an error in a future version. Neither could ever
be used twice to good effect.

Using :func:`settings(...) <hypothesis.settings>` as the sole decorator on
a test is completely pointless, so this common usage error will become an
error in a future version of Hypothesis.

3.51.0

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

This release deprecates the ``average_size`` argument to
:func:`~hypothesis.strategies.lists` and other collection strategies.
You should simply delete it wherever it was used in your tests, as it
no longer has any effect.

In early versions of Hypothesis, the ``average_size`` argument was treated
as a hint about the distribution of examples from a strategy. Subsequent
improvements to the conceptual model and the engine for generating and
shrinking examples mean it is more effective to simply describe what
constitutes a valid example, and let our internals handle the distribution.

3.50.3

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

This patch contains some internal refactoring so that we can run
with warnings as errors in CI.

Page 169 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.