Hypothesis

Latest version: v6.99.13

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

Scan your dependencies

Page 82 of 194

5.10.1

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

This release is a small internal refactoring to how shrinking interacts with :ref:`targeted property-based testing <targeted-search>` that should have no user user visible impact.

5.10.0

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

This release improves our support for datetimes and times around DST transitions.

:func:`~hypothesis.strategies.times` and :func:`~hypothesis.strategies.datetimes`
are now sometimes generated with ``fold=1``, indicating that they represent the
second occurrence of a given wall-time when clocks are set backwards.
This may be set even when there is no transition, in which case the ``fold``
value should be ignored.

For consistency, timezones provided by the :pypi:`pytz` package can now
generate imaginary times (such as the hour skipped over when clocks 'spring forward'
to daylight saving time, or during some historical timezone transitions).
All other timezones have always supported generation of imaginary times.

If you prefer the previous behaviour, :func:`~hypothesis.strategies.datetimes`
now takes an argument ``allow_imaginary`` which defaults to ``True`` but
can be set to ``False`` for any timezones strategy.

5.9.1

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

This patch fixes the rendering of :func:`~hypothesis.strategies.binary`
docstring by using the proper backticks syntax.

5.9.0

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

Failing tests which use :func:`~hypothesis.target` now report the highest
score observed for each target alongside the failing example(s), even without
:ref:`explicitly showing test statistics <statistics>`.

This improves the debugging workflow for tests of accuracy, which assert that the
total imprecision is within some error budget - for example, ``abs(a - b) < 0.5``.
Previously, shrinking to a minimal failing example could often make errors seem
smaller or more subtle than they really are (see `the threshold problem
<https://hypothesis.works/articles/threshold-problem/>`__, and :issue:`2180`).

5.8.6

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

This patch improves the docstring of :func:`~hypothesis.strategies.binary`,
the :func:`python:repr` of :func:`~hypothesis.strategies.sampled_from` on
an :class:`python:enum.Enum` subclass, and a warning in our pytest plugin.
There is no change in runtime behaviour.

5.8.5

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

This release (potentially very significantly) improves the performance of failing tests in some rare cases,
mostly only relevant when using :ref:`targeted property-based testing <targeted-search>`,
by stopping further optimisation of unrelated test cases once a failing example is found.

Page 82 of 194

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.