[tests] Add extra compatibility tests

Add a new test suite for graph template loading.
This commit is contained in:
Yann Lanthony 2025-02-06 16:46:04 +01:00
parent 025e0e3322
commit 75db9dc16c
2 changed files with 85 additions and 14 deletions

15
tests/utils.py Normal file
View file

@ -0,0 +1,15 @@
from contextlib import contextmanager
from typing import Type
from meshroom.core import registerNodeType, unregisterNodeType
from meshroom.core import desc
@contextmanager
def registeredNodeTypes(nodeTypes: list[Type[desc.Node]]):
for nodeType in nodeTypes:
registerNodeType(nodeType)
yield
for nodeType in nodeTypes:
unregisterNodeType(nodeType)