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

Add support to re-run pytest parametrize on retry

Open rrdhani7 opened this issue 5 years ago • 2 comments

Hi I have an issue when using pytest parametrize plugin. My test need parametrize plugin to generate current timestamp on runtime. But it seems that pytest-rerunfailures only use latest timestamp, instead of generate new parametrize in order to re-generate new timestamp. Is is possible to add this feature?

@pytest.mark.parametrize(argnames="timestamp", argvalues=generate_timestamp()

rrdhani7 avatar Jan 04 '21 03:01 rrdhani7

I need this feature too.

refeved avatar Jan 26 '21 07:01 refeved

@rrdhani7 Could you elaborate more, why you cannot take the current timestamp as a first thing in the test? Or you could also use a function-scoped fixture with generate_timestamp to get a new timestamp on each functions run. I do not really understand, what kind of parametrization you expect in the end.

sallner avatar Feb 15 '21 12:02 sallner