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

latest releases: hypothesis-python-6.102.1, hypothesis-python-6.102.0, hypothesis-python-6.101.0...
4 years ago

This release changes the behaviour of "floats()" when excluding signed
zeros - "floats(max_value=0.0, exclude_max=True)" can no longer
generate "-0.0" nor the much rarer "floats(min_value=-0.0,
exclude_min=True)" generate "+0.0".

The correct interaction between signed zeros and exclusive endpoints
was unclear; we now enforce the invariant that "floats()" will never
generate a value equal to an excluded endpoint (issue #2201).

If you prefer the old behaviour, you can pass "floats(max_value=-0.0)"
or "floats(min_value=0.0)" which is exactly equivalent and has not
changed. If you had two endpoints equal to zero, we recommend
clarifying your tests by using "just()" or "sampled_from()" instead of
"floats()".

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.