Releases: HypothesisWorks/hypothesis
Hypothesis for Python - version 6.127.9
We now provide a better string representation for "one_of()"
strategies, by flattening consecutive "|" combinations. For instance:
st.integers() | st.text() | st.booleans()
previously: one_of(one_of(integers(), text()), booleans())
one_of(integers(), text(), booleans())
Explicit calls to "one_of()" remain unflattened, in order to make
tracking down complicated "one_of()" constructions easier:
st.one_of(st.integers(), st.one_of(st.text(), st.booleans()))
one_of(integers(), one_of(text(), booleans()))
We print "one_of" in reprs (rather than "integers() | text() | ...")
for consistency with reprs containing ".filter" or ".map" calls, which
uses the full "one_of" to avoid ambiguity.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.8
This patch improves shrinking behavior for values from "text()" and
"binary()" which contain duplicate elements, like ""zzzabc"". It also
improves shrinking for bugs which require the same character to be
drawn from two different "text()" strategies to trigger.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.7
Fix a type-hinting regression from version 6.125.1, where we would no
longer guarantee the type of the argument to ".filter" predicates
(issue #4269).
x was previously Unknown, but is now correctly guaranteed to be int
st.integers().filter(lambda x: x > 0)
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.6
This patch tweaks the performance of the target phase, avoiding
aborting some test cases when it would be better to finish generating
them.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.5
This patch fixes a bug where "from_type()" would error on certain
types involving "Protocol" (issue #4194).
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.4
This patch updates our vendored list of top-level domains, which is
used by the provisional "domains()" strategy.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.3
Improve shrinking of non-standard NaN float values (issue #4277).
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.2
Adjust type hints for the pub-sub database implementation in version
6.126.0, and remove a remnant debug print in its implementation.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.1
Improve the clarity of printing counterexamples in stateful testing,
by avoiding confusing "Bundle" references with equivalent values drawn
from a regular strategy.
For example, we now print:
instead of
if the "unrelated" rule draws from a regular strategy such as
"integers()" instead of the "a" bundle.
The canonical version of these notes (with links) is on readthedocs.
Hypothesis for Python - version 6.127.0
This releases adds support for type aliases created with the "type"
statement (new in python 3.12) to "from_type()" and
"register_type_strategy()".
The canonical version of these notes (with links) is on readthedocs.