Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alicevision/meshroom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYann Lanthony <yann.lanthony@gmail.com>2017-11-17 21:27:20 +0300
committerYann Lanthony <yann.lanthony@gmail.com>2017-11-17 21:27:20 +0300
commite9816a6a6ed0df52b019d4684b6bb438504a6c0d (patch)
treeb278089c962936624b2ec204b374ec45bb012f2a /tests
parenta68dc53942595c7c4bd628ef715668865658cf00 (diff)
[tests] fix test_multiviewPipeline
Viewpoints.image -> Viewpoints.path
Diffstat (limited to 'tests')
-rw-r--r--tests/test_multiviewPipeline.py34
1 files changed, 18 insertions, 16 deletions
diff --git a/tests/test_multiviewPipeline.py b/tests/test_multiviewPipeline.py
index bc5d1a78..5978fbd6 100644
--- a/tests/test_multiviewPipeline.py
+++ b/tests/test_multiviewPipeline.py
@@ -9,18 +9,18 @@ def test_multiviewPipeline():
graph2b = meshroom.multiview.photogrammetryPipeline(inputImages=[])
graph3 = meshroom.multiview.photogrammetryPipeline(inputImages=['/non/existing/file1', '/non/existing/file2'])
graph4 = meshroom.multiview.photogrammetryPipeline(inputViewpoints=[
- {'image': '/non/existing/file1', 'intrinsicId': 50},
- {'image': '/non/existing/file2', 'intrinsicId': 55}
+ {'path': '/non/existing/file1', 'intrinsicId': 50},
+ {'path': '/non/existing/file2', 'intrinsicId': 55}
])
graph4b = meshroom.multiview.photogrammetryPipeline(inputViewpoints=[
- {'image': '/non/existing/file1', 'intrinsicId': 50},
- {'image': '/non/existing/file2', 'intrinsicId': 55}
+ {'path': '/non/existing/file1', 'intrinsicId': 50},
+ {'path': '/non/existing/file2', 'intrinsicId': 55}
])
- assert graph1.findNode('CameraInit').viewpoints[0].image.value == '/non/existing/fileA'
+ assert graph1.findNode('CameraInit').viewpoints[0].path.value == '/non/existing/fileA'
assert len(graph2.findNode('CameraInit').viewpoints) == 0
- assert graph3.findNode('CameraInit').viewpoints[0].image.value == '/non/existing/file1'
- assert graph4.findNode('CameraInit').viewpoints[0].image.value == '/non/existing/file1'
+ assert graph3.findNode('CameraInit').viewpoints[0].path.value == '/non/existing/file1'
+ assert graph4.findNode('CameraInit').viewpoints[0].path.value == '/non/existing/file1'
assert len(graph1.findNode('CameraInit').viewpoints) == 1
assert len(graph2.findNode('CameraInit').viewpoints) == 0
@@ -29,22 +29,24 @@ def test_multiviewPipeline():
viewpoints = graph3.findNode('CameraInit').viewpoints
assert viewpoints[0].image.value == '/non/existing/file1'
+
+ assert viewpoints[0].path.value == '/non/existing/file1'
assert viewpoints[0].intrinsicId.value == -1
- assert viewpoints[1].image.value == '/non/existing/file2'
+ assert viewpoints[1].path.value == '/non/existing/file2'
assert viewpoints[1].intrinsicId.value == -1
- assert viewpoints[0].image.isDefault() == False
+ assert viewpoints[0].path.isDefault() == False
assert viewpoints[0].intrinsicId.isDefault() == True
assert viewpoints.getPrimitiveValue(exportDefault=False) == [
- {"image": '/non/existing/file1'},
- {"image": '/non/existing/file2'},
+ {"path": '/non/existing/file1'},
+ {"path": '/non/existing/file2'},
]
for graph in (graph4, graph4b):
viewpoints = graph.findNode('CameraInit').viewpoints
- assert viewpoints[0].image.value == '/non/existing/file1'
+ assert viewpoints[0].path.value == '/non/existing/file1'
assert viewpoints[0].intrinsicId.value == 50
- assert viewpoints[1].image.value == '/non/existing/file2'
+ assert viewpoints[1].path.value == '/non/existing/file2'
assert viewpoints[1].intrinsicId.value == 55
# Ensure that all output UIDs are different as the input is different:
@@ -55,7 +57,7 @@ def test_multiviewPipeline():
for key, attr in node.attributes.items():
if attr.isOutput:
otherAttr = otherNode.attribute(key)
- assert attr.uid(None) != otherAttr.uid(None)
+ assert attr.uid() != otherAttr.uid()
# graph2 == graph2b
nodes, edges = graph2.dfsOnFinish()
@@ -64,7 +66,7 @@ def test_multiviewPipeline():
for key, attr in node.attributes.items():
otherAttr = otherNode.attribute(key)
if attr.isOutput:
- assert attr.uid(None) == otherAttr.uid(None)
+ assert attr.uid() == otherAttr.uid()
else:
for uidIndex in attr.desc.uid:
assert attr.uid(uidIndex) == otherAttr.uid(uidIndex)
@@ -76,7 +78,7 @@ def test_multiviewPipeline():
for key, attr in node.attributes.items():
otherAttr = otherNode.attribute(key)
if attr.isOutput:
- assert attr.uid(None) == otherAttr.uid(None)
+ assert attr.uid() == otherAttr.uid()
else:
for uidIndex in attr.desc.uid:
assert attr.uid(uidIndex) == otherAttr.uid(uidIndex)