From 3ed778a0d6f6c06a4657acb478f0efb3a1ba581d Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Thu, 9 Apr 2026 17:47:16 +0200 Subject: [PATCH] test: add conftest with ComfyUI module stubs --- tests/conftest.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..a896d9a --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,12 @@ +# tests/conftest.py +import sys +import os +from unittest.mock import MagicMock + +# Put the project root on sys.path so tests can import tracker, mapper directly +sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) + +# Stub ComfyUI-only modules before any test file imports project code +for mod in ("folder_paths", "nodes", "server", "folder_paths.folder_names_and_paths"): + if mod not in sys.modules: + sys.modules[mod] = MagicMock()