lycantropos / hypothesis_sqlalchemy

hypothesis strategies for generating SQLAlchemy objects
MIT License
28 stars 8 forks source link

Shrinking nullable columns #20

Closed rubenhelsloot closed 5 years ago

rubenhelsloot commented 5 years ago

According to the hypothesis docs, st.one_of shrinks towards elements earlies in the list. For nullable columns, you use result |= st.none(), which results in st.one_of(<other strategy>, st.none()).

Would it be desirable to interchange the order so the strategy will shrink towards NULLS rather than filled values?

lycantropos commented 5 years ago

Sounds reasonable and should be easy to fix.