Hypothesis

Latest version: v6.99.13

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

Scan your dependencies

Page 59 of 194

6.8.1

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

This patch lays more groundwork for filter rewriting (:issue:`2701`).
There is no user-visible change... yet.

6.8.0

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

This release :func:`registers <hypothesis.strategies.register_type_strategy>` the
remaining builtin types, and teaches :func:`~hypothesis.strategies.from_type` to
try resolving :class:`~python:typing.ForwardRef` and :class:`~python:typing.Type`
references to built-in types.

6.7.0

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

This release teaches :class:`~hypothesis.stateful.RuleBasedStateMachine` to avoid
checking :func:`~hypothesis.stateful.invariant`\ s until all
:func:`~hypothesis.stateful.initialize` rules have been run. You can enable checking
of specific invariants for incompletely initialized machines by using
``invariant(check_during_init=True)`` (:issue:`2868`).

In previous versions, it was possible if awkward to implement this behaviour
using :func:`~hypothesis.stateful.precondition` and an auxiliary variable.

6.6.1

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

This patch improves the error message when :func:`~hypothesis.strategies.from_type`
fails to resolve a forward-reference inside a :class:`python:typing.Type`
such as ``Type["int"]`` (:issue:`2565`).

6.6.0

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

This release makes it an explicit error to apply :func:`~hypothesis.stateful.invariant`
to a :func:`~hypothesis.stateful.rule` or :func:`~hypothesis.stateful.initialize` rule
in :doc:`stateful testing <stateful>`. Such a combination had unclear semantics,
especially in combination with :func:`~hypothesis.stateful.precondition`, and was never
meant to be allowed (:issue:`2681`).

6.5.0

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

This release adds :ref:`the explain phase <phases>`, in which Hypothesis
attempts to explain *why* your test failed by pointing to suspicious lines
of code (i.e. those which were always, and only, run on failing inputs).
We plan to include "generalising" failing examples in this phase in a
future release (:issue:`2192`).

Page 59 of 194

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.