Ejemplo n.º 1
0
 def run(self, stop_after=0):
     st = StoppableThread()
     st.start()
     
     time.sleep(stop_after)
     st.stop()
     st.join()
Ejemplo n.º 2
0
 def test_05_run_stop(self):
     st = StoppableThread()
     assert not st.stopped()
     
     st.stop()
     assert st.stopped()