mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
[tests] Test graph loading behavior on connected attributes with callbacks
This commit is contained in:
parent
4f82fa82ce
commit
31c5a5de5f
1 changed files with 19 additions and 0 deletions
|
@ -160,3 +160,22 @@ class TestAttributeCallbackTriggerInGraph:
|
|||
loadedNode = loadedGraph.node(node.name)
|
||||
assert loadedNode
|
||||
assert loadedNode.affectedInput.value == 2
|
||||
|
||||
def test_loadingGraphDoesNotTriggerCallbackForConnectedAttributes(
|
||||
self, graphSavedOnDisk
|
||||
):
|
||||
graph: Graph = graphSavedOnDisk
|
||||
nodeA = graph.addNewNode(NodeWithAttributeChangedCallback.__name__)
|
||||
nodeB = graph.addNewNode(NodeWithAttributeChangedCallback.__name__)
|
||||
|
||||
graph.addEdge(nodeA.input, nodeB.input)
|
||||
nodeA.input.value = 5
|
||||
nodeB.affectedInput.value = 2
|
||||
|
||||
graph.save()
|
||||
|
||||
loadedGraph = loadGraph(graph.filepath)
|
||||
loadedNodeB = loadedGraph.node(nodeB.name)
|
||||
assert loadedNodeB
|
||||
assert loadedNodeB.affectedInput.value == 2
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue