[pytest-dev] HowTo re-run test function N times?

Leah Klearman lklrmn at gmail.com
Tue Jan 14 19:19:45 CET 2014


Anton -

I would be happy to accept patches on pytest-rerunfailures if you can
figure out how to make it go. I'm currently not using either pytest or
classSetUp, but i know you're not the only one interested.

-Leah


On Tue, Jan 14, 2014 at 2:57 AM, Anton P <anton7811 at gmail.com> wrote:

> Hi All,
>
> We need to create plugin that allows us to re-run some  test case N times
> (or until failure).
>
> We found 2 possible solutions:
>
> 1) Using copy module we copy items on pytest_collection_modifyitems hook.
> This works good (-x option allows to re-run until the first failure)
> But this works very slow in case there are a lot of items in collection
> because filtering isn't performed yet.
>
> 2) Also there is alredy developed plugin (
> https://github.com/klrmn/pytest-rerunfailures/blob/master/rerunfailures/plugin.py).
> But it doesn't work with test classes.
>
> Does anybody have any ideas about fast and universal solution?
>
> Thank you in advance!
> Anton
>
>
> _______________________________________________
> Pytest-dev mailing list
> Pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20140114/b3c7cf91/attachment.html>


More information about the Pytest-dev mailing list