Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 95 of 195

4.47.0

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

This release commonizes some code between running explicit examples and normal test execution.
The main user visible impact of this is that deadlines are now enforced when running explicit examples.

4.46.1

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

This patch ensures that a KeyboardInterrupt received during example generation
is not treated as a mystery test failure but instead propagates to the top
level, not recording the interrupted generation in the conjecture data tree.
Thanks to Anne Archibald for identifying and fixing the problem.

4.46.0

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

This release changes the behaviour of :func:`~hypothesis.strategies.floats`
when excluding signed zeros - ``floats(max_value=0.0, exclude_max=True)``
can no longer generate ``-0.0`` nor the much rarer
``floats(min_value=-0.0, exclude_min=True)`` generate ``+0.0``.

The correct interaction between signed zeros and exclusive endpoints was unclear;
we now enforce the invariant that :func:`~hypothesis.strategies.floats` will
never generate a value equal to an excluded endpoint (:issue:`2201`).

If you prefer the old behaviour, you can pass ``floats(max_value=-0.0)`` or
``floats(min_value=0.0)`` which is exactly equivalent and has not changed.
If you had *two* endpoints equal to zero, we recommend clarifying your tests by using
:func:`~hypothesis.strategies.just` or :func:`~hypothesis.strategies.sampled_from`
instead of :func:`~hypothesis.strategies.floats`.

4.45.1

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

This patch improves the error message when invalid arguments are passed
to :func:`~hypothesis.stateful.rule` or :func:`~hypothesis.stateful.invariant`
(:issue:`2149`).

Thanks to Benjamin Palmer for this bugfix!

4.45.0

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

This release supports :obj:`python:typing.Final` and :obj:`python:typing.TypedDict`
in :func:`~hypothesis.strategies.from_type`.

4.44.5

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

This patch disables our :pypi:`pytest` plugin when running on versions
of :pypi:`pytest` before 4.3, the oldest our plugin supports.
Note that at time of writing the Pytest developers only support 4.6 and later!

Hypothesis *tests* using :func:`given() <hypothesis.given>` work on any
test runner, but our integrations to e.g. avoid example database collisions
when combined with ``pytest.mark.parametrize`` eventually drop support
for obsolete versions.

Page 95 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.