github HypothesisWorks/hypothesis hypothesis-python-6.127.9
Hypothesis for Python - version 6.127.9

7 hours ago

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.

Don't miss a new hypothesis release

NewReleases is sending notifications on new releases.