Controlling the size of generated examples

32 views
Skip to first unread message

Daniel Mahler

unread,
Jan 31, 2022, 12:27:55 AM1/31/22
to Hypothesis users
How can I influence the size of generated examples?
I have some complex nested datastructures and I am using the infer strategy to gerate the test examples.
This works correctly but I would like to generate larger examples,
primarily longer lists and larger dictionaries

Thanks
Daniel

Matthew Butner

unread,
Jan 16, 2024, 4:12:16 PM1/16/24
to Hypothesis users
The only thing that I can think of is instead of allowing the strategy to be inferred, to make it explicit and then set the min_size and max_size properties of strategies to be within ranges that you want. I know it isn't ideal given you have a complex type but it is the only suggestion I have. 
Reply all
Reply to author
Forward
0 new messages