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

DirectedCycleUnitTest.test_cycle()   A

Complexity

Conditions 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
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()