Commit 4c2acbc2 authored by Łukasz Nowak's avatar Łukasz Nowak

Cover case of cyclic connected tree.

parent 6a43c5eb
...@@ -8505,6 +8505,26 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -8505,6 +8505,26 @@ class TestVifibSlapWebService(testVifibMixin):
} }
self.assertEqual(True, self.checkNotCyclic(graph)) self.assertEqual(True, self.checkNotCyclic(graph))
def test_si_tree_complex_cyclic(self):
"""Tree is not cyclic
B --> A
\-> C --> D
^ \-> E --> F -\
\-------------/
"""
self._test_si_tree()
graph = {
'A': [],
'B': ['A', 'C'],
'C': ['D', 'E'],
'D': [],
'E': ['F'],
'F': ['C'],
}
from erp5.document.SoftwareInstance import CyclicSoftwareTree
self.assertRaises(CyclicSoftwareTree, self.checkNotCyclic, graph)
def test_si_tree_simple_list_disconnected_not_cyclic(self): def test_si_tree_simple_list_disconnected_not_cyclic(self):
"""Two lists are disconnected """Two lists are disconnected
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment