Skip to content

Releases: HypothesisWorks/hypothesis

Hypothesis for Python - version 6.128.2

10 Mar 04:40
Compare
Choose a tag to compare

Improves input validation for several strategies in our pandas extra,
so that they raise a helpful "InvalidArgument" rather than
"OverflowError".

Discovered by our recent string generation upgrade.

The canonical version of these notes (with links) is on readthedocs.

Hypothesis for Python - version 6.128.1

09 Mar 18:59
Compare
Choose a tag to compare

Hypothesis for Python - version 6.128.0

09 Mar 18:27
Compare
Choose a tag to compare

"text()" now occasionally generates from a preselected list of strings
which are likely to find bugs. These include ligatures, right-to-left
and top-to-bottom text, emojis, emoji modifiers, strings like
""Infinity"", ""None"", and ""FALSE"", and other interesting things.
This is especially useful when testing the full unicode range, where
the search space is too large for uniform sampling to be very
effective.

Of course, examples generated this way shrink just like they normally
would. It was always possible for Hypothesis to generate these
strings; it is just more likely after this change. From the outside,
it is as if Hypothesis generated the example completely randomly.

Many thanks to the Big List of Naughty Strings, Text Rendering Hates
You, and Text Editing Hates You Too for forming the basis of this
list.

The canonical version of these notes (with links) is on readthedocs.

Hypothesis for Python - version 6.127.9

06 Mar 18:00
Compare
Choose a tag to compare

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

06 Mar 06:46
Compare
Choose a tag to compare

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

05 Mar 20:01
Compare
Choose a tag to compare

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

04 Mar 02:38
Compare
Choose a tag to compare

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

03 Mar 09:42
Compare
Choose a tag to compare

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

02 Mar 02:01
Compare
Choose a tag to compare

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

28 Feb 01:21
Compare
Choose a tag to compare