Hypothesis

Latest version: v6.100.1

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

Scan your dependencies

Page 58 of 195

6.8.9

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

This patch fixes :func:`~hypothesis.strategies.from_type` with
:mod:`abstract types <python:abc>` which have either required but
non-type-annotated arguments to ``__init__``, or where
:func:`~hypothesis.strategies.from_type` can handle some concrete
subclasses but not others.

6.8.8

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

This patch teaches :command:`hypothesis write` to check for possible roundtrips
in several more cases, such as by looking for an inverse in the module which
defines the function to test.

6.8.7

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

This patch adds a more helpful error message if you try to call
:func:`~hypothesis.strategies.sampled_from` on an :class:`~python:enum.Enum`
which has no members, but *does* have :func:`~python:dataclasses.dataclass`-style
annotations (:issue:`2923`).

6.8.6

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

The :func:`~hypothesis.strategies.fixed_dictionaries` strategy now preserves
dict iteration order instead of sorting the keys. This also affects the
pretty-printing of keyword arguments to :func:`given() <hypothesis.given>`
(:issue:`2913`).

6.8.5

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

This patch teaches :command:`hypothesis write` to default to ghostwriting
tests with ``--style=pytest`` only if :pypi:`pytest` is installed, or
``--style=unittest`` otherwise.

6.8.4

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

This patch adds type annotations for the :class:`~hypothesis.settings` decorator,
to avoid an error when running mypy in strict mode.

Page 58 of 195

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.