Meshroom/tests/test_task.py
Yann Lanthony 807b4cb155 add setup.py + switch to pytest
* pytest: more modern and easy-to-use testing framework
2017-09-19 12:11:29 +02:00

22 lines
498 B
Python

from meshroom import processGraph as pg
def test_depth():
graph = pg.Graph('Tests tasks depth')
tA = graph.addNewNode('Ls', input='/tmp')
tB = graph.addNewNode('AppendText', inputText='echo B')
tC = graph.addNewNode('AppendText', inputText='echo C')
graph.addEdges(
(tA.output, tB.input),
(tB.output, tC.input)
)
assert tA.getDepth() == 1
assert tB.getDepth() == 2
assert tC.getDepth() == 3
if __name__ == '__main__':
test_depth()