def test_timer(): with utils.Timer() as timer: time.sleep(0.1) assert timer.duration >= 0.1
def testTimer(self): with utils.Timer() as timer: time.sleep(0.1) self.assertGreaterEqual(timer.duration, 0.1)