pytest-repeat icon indicating copy to clipboard operation
pytest-repeat copied to clipboard

How do I get the current number of repetitions in the setup_class function

Open panyicheng123 opened this issue 3 years ago • 3 comments

I want to use an environment based on the number of repetitions as the picture show image

panyicheng123 avatar Sep 17 '22 09:09 panyicheng123

Thanks everyone who can reply to me

panyicheng123 avatar Sep 17 '22 09:09 panyicheng123

its not clear why you do not use parametrize of the keys instead, as that gives you the key and correctly works on any case

its not safely possible to get the functon scope repeat value at the class level

th fact that ou absolutely need the environment extracted and the number of repeats match the key means that you dont want a repeat, you want a parametrize with class scope

RonnyPfannschmidt avatar Sep 17 '22 11:09 RonnyPfannschmidt

its not clear why you do not use parametrize of the keys instead, as that gives you the key and correctly works on any case

its not safely possible to get the functon scope repeat value at the class level

th fact that ou absolutely need the environment extracted and the number of repeats match the key means that you dont want a repeat, you want a parametrize with class scope

thanks for your reply,i will try it.

panyicheng123 avatar Sep 17 '22 11:09 panyicheng123

looks like this was resolved as not needed

okken avatar Oct 09 '23 22:10 okken