File: test_timer.py

package info (click to toggle)
python-easydev 0.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 504 kB
  • sloc: python: 2,130; javascript: 49; makefile: 13
file content (13 lines) | stat: -rw-r--r-- 201 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
from easydev.timer import Timer
import time


def test_timer():

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

    tt = Timer(times)