TestException.test_exception_is_timed_out()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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