The current implementation of RandomBug is not well done. For instance, the "STRICT" mode does not work.
As we are using pytest, we should create a plugin that does this one thing the right way.
The annotation could be:
Where possible arguments are:
- condition (bool): the condition to use the random, if False run the test normally. Default is True.
- repeat (int): how many times should we repeat the test. Default is 10.
- mode (str):
- "RELAX": will retry as repeat times until it succeeds. Default value.
- "STRICT": will repeat it until it fails or hits the repeat limit.
- "BYPASS": skip the test.
Also, it should be possible to set the mode from the envar RANDOM_BUG_MODE.