Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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)
Example #4
0
    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)