Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 41 of 210

6.65.2

-------------------

This patch fixes invalid annotations detected for the tests generated by
:doc:`Ghostwritter <ghostwriter>`. It will now correctly generate ``Optional``
types with just one type argument and handle union expressions inside of type
arguments correctly. Additionally, it now supports code with the
``from __future__ import annotations`` marker for Python 3.10 and newer.

6.65.1

-------------------

This release improves the pretty-printing of enums in falsifying examples,
so that they print as their full identifier rather than their repr.

6.65.0

-------------------

Hypothesis now reports some failing inputs by showing the call which constructed
an object, rather than the repr of the object. This can be helpful when the default
repr does not include all relevant details, and will unlock further improvements
in a future version.

For now, we capture calls made via :func:`~hypothesis.strategies.builds`, and via
:ref:`SearchStrategy.map() <mapping>`.

6.64.0

-------------------

The :doc:`Ghostwritter <ghostwriter>` will now include type annotations on tests
for type-annotated code. If you want to force this to happen (or not happen),
pass a boolean to the new ``annotate=`` argument to the Python functions, or
the ``--[no-]annotate`` CLI flag.

Thanks to Nicolas Ganz for this new feature!

6.63.0

-------------------

:func:`~hypothesis.extra.pandas.range_indexes` now accepts a ``name=`` argument,
to generate named :class:`pandas.RangeIndex` objects.

Thanks to Sam Watts for this new feature!

6.62.1

-------------------

This patch tweaks :func:`xps.arrays` internals to improve PyTorch compatibility.
Specifically, ``torch.full()`` does not accept integers as the shape argument
(n.b. technically "size" in torch), but such behaviour is expected in internal
code, so we copy the ``torch`` module and patch in a working ``full()`` function.

Page 41 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.