Exemplo n.º 1
0
def test_scribe_stop():
    q = context.Queue()
    s = Scribe(q)
    s.start()
    assert s.is_alive() is True
    s.stop()
    assert s.is_alive() is False
Exemplo n.º 2
0
def test_scribe_finish():
    q = context.Queue()
    s = Scribe(q)
    s.start()
    assert s.is_alive() is True
    q.put(None)
    time.sleep(0.1)
    assert s.is_alive() is False