Teach st.from_type()
about remaining generic types
#2654
Labels
enhancement
it's not broken, but we want it to be better
st.from_type()
about remaining generic types
#2654
While working through the list of types in PEP 585 for #2653, I discovered some generic types that we don't currently have registered strategies for. While they're rarely used and nobody has every complained, it would be nice to add them! Note that this applies to every version of Python we support via the
typing
module equivalents; they're not new in 3.9.master...Zac-HD:register-more-types has my current progress. Still to do:
dict_items
is added to the strategy forcollections.abc.Set[T]
(which breaks because the elements are tuples, not the requested type), and stop that.typing
module versions which work on all supported Pythons.collections.abc.Generator
working.Coroutine
,AsyncGenerator
, andcontextlib.AbstractAsyncContextManager
are hereby ruled out of scope though, since (a) nobody has asked for them and (b) testing them would be a complete pain because we don't currently have any async tests (see here for how that would work).The text was updated successfully, but these errors were encountered: