Returns a random list of flags chosen from the configurations in EXTRA_FLAGS.
(rng, extra_flags=EXTRA_FLAGS)
| 91 | |
| 92 | |
| 93 | def random_extra_flags(rng, extra_flags=EXTRA_FLAGS): |
| 94 | """Returns a random list of flags chosen from the configurations in |
| 95 | EXTRA_FLAGS. |
| 96 | """ |
| 97 | return list(chain( |
| 98 | *(flags.split(' ') |
| 99 | for prob, flags in extra_flags if rng.random() < prob))) |
| 100 | |
| 101 | |
| 102 | def _flag_prefix(flag): |
no test coverage detected