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
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