mvpa2.testing.tools.labile

mvpa2.testing.tools.labile(niter=3, nfailures=1)

Decorator for labile tests – runs multiple times

Let’s reduce probability of random failures but re-running the test multiple times allowing to fail few in a row. Makes sense only for tests which run on random data, so usually decorated with reseed_rng. Otherwise it is unlikely that result would change if algorithms are deterministic and operate on the same data

Similar in idea to https://pypi.python.org/pypi/flaky .

Parameters:

niter: int, optional

How many iterations to run maximum

nfailures: int, optional

How many failures to allow