Ejemplo n.º 1
0
 def test_timer(self):
     """Testing Timer: basic behaviour"""
     d = {}
     x = Timer(0.1, _testing_fn, "test", d)
     x.run()
     time.sleep(0.5)
     assert d["value"] == "test"
     x.stop()
Ejemplo n.º 2
0
 def test_timer(self):
     """Testing Timer: basic behaviour"""
     d = {}
     x = Timer(0.1, _testing_fn, "test", d)
     x.run()
     time.sleep(0.5)
     assert d["value"] == "test"
     x.stop()
Ejemplo n.º 3
0
 def test_timer_stop(self):
     """Testing Timer: stop"""
     x = Timer(0.2, lambda: None)
     x.run()
     x.stop()
     x.wait(2, 0)  # increase to count green thread
Ejemplo n.º 4
0
 def test_timer_stop(self):
     """Testing Timer: stop"""
     x = Timer(0.2, lambda: None)
     x.run()
     x.stop()
     x.wait(2, 0)  # increase to count green thread