File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 11from meshroom .core .graph import Graph
2+ from meshroom .core .exception import CyclicDependencyError
3+
4+ import pytest
25
36
47def test_depth ():
@@ -278,3 +281,20 @@ def test_duplicate_nodes():
278281 assert nMap [n2 ][0 ].input .getLinkParam () == nMap [n1 ][0 ].output
279282 assert nMap [n3 ][0 ].input .getLinkParam () == nMap [n1 ][0 ].output
280283 assert nMap [n3 ][0 ].input2 .getLinkParam () == nMap [n2 ][0 ].output
284+
285+
286+ def test_acyclic_connection_should_raise_error ():
287+
288+ # Given
289+ graph = Graph ("Test acyclic connection" )
290+ tB = graph .addNewNode ("AppendText" , inputText = "echo B" )
291+ tC = graph .addNewNode ("AppendText" , inputText = "echo C" )
292+
293+ graph .addEdge (tB .output , tC .input )
294+
295+ # When
296+ # Then
297+ with pytest .raises (CyclicDependencyError ):
298+ graph .addEdge (tC .output , tB .input )
299+
300+
You can’t perform that action at this time.
0 commit comments