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

latest releases: hypothesis-python-6.102.4, hypothesis-python-6.102.3, hypothesis-python-6.102.2...
4 years ago

This release improves support for the SupportsOp protocols from the
"typing" module when using on "from_type()" as outlined in issue
#2292. The following types now generate much more varied strategies
when called with "from_type()":

  • "typing.SupportsAbs"

  • "typing.SupportsBytes"

  • "typing.SupportsComplex"

  • "typing.SupportsInt"

  • "typing.SupportsFloat"

  • "typing.SupportsRound"

Note that using "from_type()" with one of the above strategies will
not ensure that the the specified function will execute successfully
(ie : the strategy returned for "from_type(typing.SupportsAbs)" may
include NaNs or things this will cause the "abs()" function to error.
)

Thanks to Lea Provenzano for this patch.

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.