def test_repeat(RE): # Check if lists and callables both work messages = [1, 2, 3] def plan(): yield from messages num = 3 expected = [Msg('checkpoint'), 1, 2, 3] * num assert list(repeat(plan, num=num)) == expected
def test_repeat_using_RE(RE): def plan(): yield Msg('open_run') yield Msg('close_run') RE(repeat(plan, 2))
def issue253(times=1): global _tune_number, _total_tunes logger.info("# ------- Testing for issue #253 with %d iterations", times) _tune_number = 0 _total_tunes = times yield from bps.repeat(_full_guard_slits_tune_, num=times)
def inner_count(): return ( yield from bps.repeat(partial(per_shot, detectors), num=num, delay=delay) )