Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 102 of 195

4.39.0

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

This release adds the :func:`~hypothesis.extra.numpy.basic_indices` strategy,
to generate `basic indexes <https://numpy.org/doc/stable/reference/arrays.indexing.html>`__
for arrays of the specified shape (:issue:`1930`).

It generates tuples containing some mix of integers, :obj:`python:slice` objects,
``...`` (Ellipsis), and :obj:`numpy:numpy.newaxis`; which when used to index an array
of the specified shape produce either a scalar or a shared-memory view of the array.
Note that the index tuple may be longer or shorter than the array shape, and may
produce a view with another dimensionality again!

Thanks to Lampros Mountrakis, Ryan Soklaski, and Zac Hatfield-Dodds for their
collaboration on this surprisingly subtle strategy!

4.38.3

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

This patch defers creation of the ``.hypothesis`` directory until we have
something to store in it, meaning that it will appear when Hypothesis is
used rather than simply installed.

Thanks to Peter C Kroon for the Hacktoberfest patch!

4.38.2

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

This patch bumps our dependency on :pypi:`attrs` to ``>=19.2.0``;
but there are no user-visible changes to Hypothesis.

4.38.1

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

This is a comment-only patch which tells :pypi:`mypy` 0.730 to ignore
some internal compatibility shims we use to support older Pythons.

4.38.0

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

This release adds the :func:`hypothesis.target` function, which implements
:ref:`targeted property-based testing <targeted-search>`
(:issue:`1779`).

By calling :func:`~hypothesis.target` in your test function, Hypothesis can
do a hill-climbing search for bugs. If you can calculate a suitable metric
such as the load factor or length of a queue, this can help you find bugs with
inputs that are highly improbably from unguided generation - however good our
heuristics, example diversity, and deduplication logic might be. After all,
those features are at work in targeted PBT too!

4.37.0

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

This release emits a warning if you use the ``.example()`` method of
a strategy in a non-interactive context.

:func:`~hypothesis.given` is a much better choice for writing tests,
whether you care about performance, minimal examples, reproducing
failures, or even just the variety of inputs that will be tested!

Page 102 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.