Hypothesis version 6.170.0
- run_conformance_test() checks that providers are able to generate a representative range of values
- run_conformance_test() can now test providers with required constructor arguments
- run_conformance_test() runs many test cases against each provider
- run_conformance_test() treats running out of entropy as expected control flow
- Integer draws in the provider underlying fuzz_one_input could never generate negative values
- String draws from an empty alphabet in the provider underlying fuzz_one_input now return the empty string instead of consuming the whole buffer
- Verbose output for stateful tests now reads 'Test case: <state machine>' rather than trailing off after the colon
From Hypothesis
This release substantially strengthens "run_conformance_test()", which authors of alternative backends can use to test their provider. It can now test providers with required constructor arguments, runs many test cases against each provider, treats running out of entropy as expected control flow, and checks that providers are able to generate a representative range of values.
These new checks catch two bugs in the provider underlying fuzz_one_input, which this release also fixes: integer draws could never generate negative values, and string draws from an empty alphabet consumed the whole buffer instead of returning the empty string.
Verbose output for stateful tests now reads "Test case: " rather than trailing off after the colon.
Thanks to @reachsridhard for reporting the integers bug and prototyping these improvements.
The canonical version of these notes (with links) is on readthedocs.