def test_block_detect_with_itimer (self): def look_im_blocking (): import time time.sleep(0.5) from evy.tools import debug debug.hub_blocking_detection(True, resolution = 0.1) gt = spawn(look_im_blocking) self.assertRaises(RuntimeError, gt.wait) debug.hub_blocking_detection(False)
def test_block_detect_with_itimer(self): def look_im_blocking(): import time time.sleep(0.5) from evy.tools import debug debug.hub_blocking_detection(True, resolution=0.1) gt = spawn(look_im_blocking) self.assertRaises(RuntimeError, gt.wait) debug.hub_blocking_detection(False)
def test_block_detect (self): def look_im_blocking (): import time time.sleep(2) from evy.tools import debug debug.hub_blocking_detection(True) gt = spawn(look_im_blocking) self.assertRaises(RuntimeError, gt.wait) debug.hub_blocking_detection(False)
def test_block_detect(self): def look_im_blocking(): import time time.sleep(2) from evy.tools import debug debug.hub_blocking_detection(True) gt = spawn(look_im_blocking) self.assertRaises(RuntimeError, gt.wait) debug.hub_blocking_detection(False)