Beispiel #1
0
def test_one_event_manager():
    event_manager.register(fake_test)
    event_manager.trigger_all()
    for _ in xrange(5):
        gevent.sleep(1)
    event_manager.set_event()

    assert 4 <= len(LOCAL_STACK) <= 6
Beispiel #2
0
def test_one_event_manager():
    event_manager.register(fake_test)
    event_manager.trigger_all()
    for _ in xrange(5):
        gevent.sleep(1)
    event_manager.set_event()

    assert 4 <= len(LOCAL_STACK) <= 6
Beispiel #3
0
def test_multi_event_manager():
    event_manager.clear_event()
    event_manager.register(queue_test1)
    event_manager.register(queue_test2)
    event_manager.trigger_all()
    gevent.sleep(5)
    event_manager.set_event()

    assert 8 <= Q.qsize() <= 12
Beispiel #4
0
def test_multi_event_manager():
    event_manager.clear_event()
    event_manager.register(queue_test1)
    event_manager.register(queue_test2)
    event_manager.trigger_all()
    gevent.sleep(5)
    event_manager.set_event()

    assert 8 <= Q.qsize() <= 12