mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
[tests] add explicit check on the list of attribute names
This commit is contained in:
parent
36cf19eeda
commit
4e3f718786
1 changed files with 2 additions and 0 deletions
|
@ -237,6 +237,7 @@ def test_description_conflict():
|
||||||
if isinstance(srcNode.nodeDesc, SampleNodeV1):
|
if isinstance(srcNode.nodeDesc, SampleNodeV1):
|
||||||
# V1 => V2: 'input' has been renamed to 'in'
|
# V1 => V2: 'input' has been renamed to 'in'
|
||||||
assert len(compatNode.attributes) == 3
|
assert len(compatNode.attributes) == 3
|
||||||
|
assert list(compatNode.attributes.keys()) == ["input", "paramA", "output"]
|
||||||
assert hasattr(compatNode, "input")
|
assert hasattr(compatNode, "input")
|
||||||
assert not hasattr(compatNode, "in")
|
assert not hasattr(compatNode, "in")
|
||||||
|
|
||||||
|
@ -244,6 +245,7 @@ def test_description_conflict():
|
||||||
upgradedNode = g.upgradeNode(nodeName)[0]
|
upgradedNode = g.upgradeNode(nodeName)[0]
|
||||||
assert isinstance(upgradedNode, Node) and isinstance(upgradedNode.nodeDesc, SampleNodeV2)
|
assert isinstance(upgradedNode, Node) and isinstance(upgradedNode.nodeDesc, SampleNodeV2)
|
||||||
|
|
||||||
|
assert list(upgradedNode.attributes.keys()) == ["in", "paramA", "output"]
|
||||||
assert not hasattr(upgradedNode, "input")
|
assert not hasattr(upgradedNode, "input")
|
||||||
assert hasattr(upgradedNode, "in")
|
assert hasattr(upgradedNode, "in")
|
||||||
# check uid has changed (not the same set of attributes)
|
# check uid has changed (not the same set of attributes)
|
||||||
|
|
Loading…
Add table
Reference in a new issue