You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many Hypothesis strategies accept min_value and max_value arguments, which usually have to be the same type as the examples the strategy can generate. The strategies for numbers generally allow any type of number to be used - which is convenient, but has a surprising catch: sometimes, the strategy will be unable to generate the given bound or bounds!
We should deprecate bounds for integers() and floats() which cannot be exactly represented as integers and floats respectively. For example, you can check if min_value != min_int_value and then use note_deprecation to issue the warning.
Finally, we should deprecate bounds for fractions() with a non-None max_denominator where the denominator of the bound (after casting to Fraction) is larger than max_denominator.
The text was updated successfully, but these errors were encountered:
Many Hypothesis strategies accept
min_valueandmax_valuearguments, which usually have to be the same type as the examples the strategy can generate. The strategies for numbers generally allow any type of number to be used - which is convenient, but has a surprising catch: sometimes, the strategy will be unable to generate the given bound or bounds!We should deprecate bounds for
integers()andfloats()which cannot be exactly represented as integers and floats respectively. For example, you can checkif min_value != min_int_valueand then usenote_deprecationto issue the warning.Finally, we should deprecate bounds for
fractions()with a non-Nonemax_denominatorwhere the denominator of the bound (after casting to Fraction) is larger thanmax_denominator.The text was updated successfully, but these errors were encountered: