Ejemplo n.º 1
0
 def send_messages(self, result, match, timers):
     for r in utils.process_messages(result, with_target=True):
         if isinstance(r, Timer):
             timers.append(r)
         else:
             match.msg(r[1], *r[2], target=r[0], **r[3])
Ejemplo n.º 2
0
def test_processing_messages_with_target():
    for result, expected in MESSAGES_WITH_TARGET:
        for r in utils.process_messages(result, with_target=True):
            assert r == expected
Ejemplo n.º 3
0
def test_processing_messages():
    for result, expected in MESSAGES:
        for r in utils.process_messages(result):
            assert r == expected
Ejemplo n.º 4
0
def test_processing_messages_with_target():
    for result, expected in MESSAGES_WITH_TARGET:
        for r in utils.process_messages(result, with_target=True):
            assert r == expected
Ejemplo n.º 5
0
def test_processing_messages():
    for result, expected in MESSAGES:
        for r in utils.process_messages(result):
            assert r == expected
Ejemplo n.º 6
0
 def send_messages(self, result, match, timers):
     for r in utils.process_messages(result, with_target=True):
         if isinstance(r, Timer):
             timers.append(r)
         else:
             match.msg(r[1], *r[2], target=r[0], **r[3])