test_timer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 13
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A TestTimer.test_sec() 0 3 1
A TestTimer.test_mms() 0 3 1
1
import unittest
2
from looptools import Timer
3
from time import sleep
4
5
6
class TestTimer(unittest.TestCase):
7
    @Timer.decorator
8
    def test_mms(self):
9
        sleep(.05)
10
11
    @Timer.decorator
12
    def test_sec(self):
13
        sleep(1.1)
14
15
16
if __name__ == '__main__':
17
    unittest.main()
18