mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-31 01:46:31 +02:00
[tests] Attribute callback behavior on clearing upstream dynamic output
This commit is contained in:
parent
ae9ae9b11f
commit
3cc57f89e6
1 changed files with 20 additions and 0 deletions
|
@ -387,3 +387,23 @@ class TestAttributeCallbackBehaviorWithUpstreamDynamicOutputs:
|
||||||
|
|
||||||
assert nodeB.input.value == 20
|
assert nodeB.input.value == 20
|
||||||
assert nodeB.affectedInput.value == 0
|
assert nodeB.affectedInput.value == 0
|
||||||
|
|
||||||
|
|
||||||
|
def test_clearingDynamicOutputValueDoesNotTriggerDownstreamAttributeChangedCallback(
|
||||||
|
self, graphWithIsolatedCache
|
||||||
|
):
|
||||||
|
graph: Graph = graphWithIsolatedCache
|
||||||
|
nodeA = graph.addNewNode(NodeWithDynamicOutputValue.__name__)
|
||||||
|
nodeB = graph.addNewNode(NodeWithAttributeChangedCallback.__name__)
|
||||||
|
|
||||||
|
nodeA.input.value = 10
|
||||||
|
executeGraph(graph)
|
||||||
|
|
||||||
|
graph.addEdge(nodeA.output, nodeB.input)
|
||||||
|
|
||||||
|
expectedPreClearValue = nodeA.input.value * 2 * 2
|
||||||
|
assert nodeB.affectedInput.value == expectedPreClearValue
|
||||||
|
|
||||||
|
nodeA.clearData()
|
||||||
|
assert nodeA.output.value == nodeB.input.value is None
|
||||||
|
assert nodeB.affectedInput.value == expectedPreClearValue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue