ApprovalTests.Python icon indicating copy to clipboard operation
ApprovalTests.Python copied to clipboard

create_all_combinations and create_all_pairs methods would be useful

Open jmasonlee opened this issue 3 years ago • 3 comments

Sometimes I need to generate all combinations or all pairs of inputs, and then write a custom verify that concatenates and transforms the output of things so that it looks right.

I would like a method that would allow me to create all combinations of inputs so that I can customize what comes after and verify the output with verify_storyboard, or verify, or verify_all, whatever is appropriate

jmasonlee avatar Jan 16 '23 14:01 jmasonlee

Other options would be good too, I don't necessarily need these particular methods, but basically, I'd like to be able to write a custom verify method, but use the existing approvals code to generate multiple inputs for it

jmasonlee avatar Jan 16 '23 15:01 jmasonlee

Could you provide an example?

nitsanavni avatar Jan 16 '23 18:01 nitsanavni

@jmasonlee I see there's this: def get_best_covering_pairs()

Not sure it's callable by user code...

And internally it's using allpairspy

Is that useful?

nitsanavni avatar Jan 19 '23 14:01 nitsanavni