Meshroom/tests/__init__.py
Candice Bentéjac 777ed4207e [tests] Use the NodePluginManager instance in the unit tests
The plugin manager is now effectively used for all the operations that
involve registering or unregistering nodes.
2025-06-05 14:40:10 +02:00

14 lines
541 B
Python

import os
from meshroom.core import loadAllNodes
from meshroom.core import pluginManager
plugins = loadAllNodes(os.path.join(os.path.dirname(__file__), "nodes"))
for plugin in plugins:
pluginManager.addPlugin(plugin)
pluginManager.registerPlugin(plugin.name)
if os.getenv("MESHROOM_PIPELINE_TEMPLATES_PATH", False):
os.environ["MESHROOM_PIPELINE_TEMPLATES_PATH"] += os.pathsep + os.path.dirname(os.path.realpath(__file__))
else:
os.environ["MESHROOM_PIPELINE_TEMPLATES_PATH"] = os.path.dirname(os.path.realpath(__file__))