Пример #1
0
def test_timer():
    with utils.Timer() as timer:
        time.sleep(0.1)

    assert timer.duration >= 0.1
Пример #2
0
    def testTimer(self):
        with utils.Timer() as timer:
            time.sleep(0.1)

        self.assertGreaterEqual(timer.duration, 0.1)