from_type(Set[Decimal]) raises an internal error because signalling NaN is not hashable
#2320
Labels
enhancement
it's not broken, but we want it to be better
I've gotten
from_type(Set[Hashable])to reliably fail during generation. It seems thatHashablegeneratesDecimalobjects, which is fine. However, hypothesis fails when trying to hash signaling NaNs.I'm not too familiar with the inner workings of strategy generation, but I think it would be reasonable to "turn off" signaling NaNs in composite strategies whenever they might need to be hashed (
sets,frozensets, the keys ofdictionaries, etc...).Here's a minimal example.
Thanks for such an awesome library! If this is an easy fix, I'm happy to take it... but a quick scan of the relevant code seemed a bit complex.
The text was updated successfully, but these errors were encountered: