nara_wpe.test_utils module

class test_utils.QuietTestRunner[source]

Bases: object

test_utils.repeat_with_success_at_least(times, min_success)[source]

Decorator for multiple trial of the test case.

The decorated test case is launched multiple times. The case is judged as passed at least specified number of trials. If the number of successful trials exceeds min_success, the remaining trials are skipped.

  • times (int) – The number of trials.
  • min_success (int) – Threshold that the decorated test case is regarded as passed.

Decorator that imposes the test to be successful at least once.

Decorated test case is launched multiple times. The case is regarded as passed if it is successful at least once.


In current implementation, this decorator grasps the failure information of each trial.

Parameters:times (int) – The number of trials.