Skip to content

Commit d15506b

Browse files
committed
[tests] Add basic tests to load the nodes
1 parent 6ab171f commit d15506b

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/__init__.py

Whitespace-only changes.

tests/test_loadNodes.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python
2+
# coding:utf-8
3+
4+
"""
5+
Tests ensuring that all nodes can be loaded correctly, even if the environment is not correctly setup.
6+
"""
7+
8+
NODE_TYPES = ["ImageDetectionPrompt", "ImageSegmentationBox", "ImageSegmentationPrompt", "ImageTagsExtraction", "SegmentAnything"]
9+
10+
from os import listdir
11+
from os.path import basename, splitext, isfile, join
12+
13+
NODE_TYPES = [splitext(basename(f))[0] for f in listdir("../meshroom/nodes/imageSegmentation") if f != "__init__.py"]
14+
15+
import meshroom.core
16+
17+
def test_load_nodes_without_env():
18+
meshroom.core.initNodes()
19+
20+
for type in NODE_TYPES:
21+
assert type in meshroom.core.desc

0 commit comments

Comments
 (0)