Completed
Push — master ( 60d34b...f90dfb )
by Xianshun
01:18
created

DirectedCycleUnitTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_cycle() 0 6 1
1
import unittest
2
3
from pyalgs.algorithms.graphs.directed_cycle import DirectedCycle
4
from tests.algorithms.graphs.util import create_dag
5
6
7
class DirectedCycleUnitTest(unittest.TestCase):
8
9
    def test_cycle(self):
10
11
        dag = create_dag()
12
        dc = DirectedCycle(dag)
13
14
        self.assertFalse(dc.hasCycle())
15
16
17
if __name__ == '__main__':
18
    unittest.main()