File: test_timer.py

package info (click to toggle)
python-easydev 0.13.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 636 kB
  • sloc: python: 1,904; makefile: 116; javascript: 49
file content (14 lines) | stat: -rw-r--r-- 204 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import time

from easydev.timer import Timer


def test_timer():

    times = []
    with Timer(times):
        time.sleep(0.1)
    assert len(times) == 1
    assert sum(times) < 1

    tt = Timer(times)