box / flaky

Plugin for nose or pytest that automatically reruns flaky tests.
Apache License 2.0
378 stars 60 forks source link

using flaky outside unit tests #118

Closed ssbarnea closed 7 years ago

ssbarnea commented 7 years ago

I would like to be able to use @flaky outside unittests, on normal Python code in order to implement a simple and clean retry mechanism.

Note: if this is already possible it should be documented.

jmoldow commented 7 years ago

Hi @ssbarnea ,

Flaky is only intended for use with unit tests, as a large part of its functionality is to interface with unit test systems (hook into unittest or pytest, re-do setup and teardown, report errors to the system, print the flaky report, etc.)