nara_wpe.test_utils module¶
-
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.
Parameters: - times (int) – The number of trials.
- min_success (int) – Threshold that the decorated test case is regarded as passed.
-
test_utils.
retry
(times)[source]¶ 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.
Note
In current implementation, this decorator grasps the failure information of each trial.
Parameters: times (int) – The number of trials.