def create_dict_and_type(tuple_of_strats):
"""Map two primitive strategies into a strategy for dict and type."""
(prim_strat_1, type_1), (prim_strat_2, type_2) = tuple_of_strats
return st.tuples(st.dictionaries(prim_strat_1, prim_strat_2),
create_generic_dict_type(type_1, type_2))
评论列表
文章目录