Exemplo n.º 1
0
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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
def test_repeat_using_RE(RE):
    def plan():
        yield Msg('open_run')
        yield Msg('close_run')
    RE(repeat(plan, 2))
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
 def inner_count():
     return (
         yield from bps.repeat(partial(per_shot, detectors), num=num, delay=delay)
     )
Exemplo n.º 6
0
def test_repeat_using_RE(RE):
    def plan():
        yield Msg('open_run')
        yield Msg('close_run')
    RE(repeat(plan, 2))