New issue 506: Add option to run "flaky" tests repeatedly to catch rare errors
https://bitbucket.org/hpk42/pytest/issue/506/add-option-to-run-flaky-tests-repeatedly
Christoph Deil:
Would it be possible to add an option to pytest to run tests repeatedly (either
N times or until forever)?
This would be useful to catch non-deterministic "flaky" test failures such as
e.g.
```
#!python
import random
def flaky_test():
number = random.randint(0, 100)
assert number != 42
```
We currently have this problem in Astropy where some (probably socket-related)
test failures "randomly" show up on travis-ci and it would be really helpful to
be able to reproduce the failure locally:
https://github.com/astropy/astropy/issues/2064
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit