Hypothesis for Python - version 6.21.0
This release introduces strategies for array/tensor libraries adopting
the Array API standard (issue #3037). They are available in the
hypothesis.extra.array_api extra, and work much like the existing
strategies for NumPy.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.20.1
This patch fixes issue #961, where calling "given()" inline on a bound
method would fail to handle the "self" argument correctly.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.20.0
This release allows "slices()" to generate "step=None", and fixes an
off-by-one error where the "start" index could be equal to "size".
This works fine for all Python sequences and Numpy arrays, but is
undefined behaviour in the Array API standard (see pull request
#3065).
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.19.0
This release makes stateful testing more likely to tell you if you do
something unexpected and unsupported:
-
The "return_value" health check now applies to "rule()" and
"initialize()" rules, if they don't have "target" bundles, as well
as "invariant()".
-
Using a "consumes()" bundle as a "target" is deprecated, and will be
an error in a future version.
If existing code triggers these new checks, check for related bugs and
misunderstandings - these patterns never had any effect.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.18.0
This release teaches "from_type()" a neat trick: when resolving an
"typing.Annotated" type, if one of the annotations is a strategy
object we use that as the inferred strategy. For example:
PositiveInt = Annotated[int, st.integers(min_value=1)]
If there are multiple strategies, we use the last outer-most
annotation. See issue #2978 and pull request #3082 for discussion.
Requires Python 3.9 or later for "get_type_hints(...,
... (truncated)