tests.test_minerapi   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A TestException.test_exception_is_not_timed_out() 0 4 1
A TestException.test_exception_is_timed_out() 0 4 1
1
'''test miner api'''
2
import unittest
3
from helpers.antminerhelper import MinerMonitorException
4
5
class TestException(unittest.TestCase):
6
    def test_exception_is_timed_out(self):
7
        '''test'''
8
        ex = MinerMonitorException('monitor timed out')
9
        self.assertTrue(ex.istimedout())
10
11
    def test_exception_is_not_timed_out(self):
12
        '''test'''
13
        ex = MinerMonitorException('this is not the error you are looking for')
14
        self.assertFalse(ex.istimedout())
15
16
if __name__ == '__main__':
17
    unittest.main()
18