Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 189 of 210

3.19.0

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

This release adds the :func:`~hypothesis.strategies.from_regex` strategy,
which generates strings that contain a match of a regular expression.

Thanks to Maxim Kulkin for creating the
`hypothesis-regex <https://github.com/maximkulkin/hypothesis-regex>`_
package and then helping to upstream it! (:issue:`662`)

3.18.5

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

This is a bugfix release for :func:`~hypothesis.strategies.integers`.
Previously the strategy would hit an internal assertion if passed non-integer
bounds for ``min_value`` and ``max_value`` that had no integers between them.
The strategy now raises InvalidArgument instead.

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

Page 189 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.