From 620948c71bf4feb61bd4f31df87f2e83ffd1ada5 Mon Sep 17 00:00:00 2001 From: WildAi <2853742+wildminder@users.noreply.github.com> Date: Fri, 23 Oct 2026 19:13:06 +0300 Subject: [PATCH] plan(P3.6): flip the package import smoke test strict --- tests/test_package_import.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_package_import.py b/tests/test_package_import.py index aef3e73..034db7b 100644 --- a/tests/test_package_import.py +++ b/tests/test_package_import.py @@ -12,6 +12,7 @@ gate runs without environment variables). from __future__ import annotations +import importlib import json import os import subprocess @@ -80,6 +81,19 @@ def _comfyui_root() -> str: return str(root.resolve()) +@pytest.mark.mock_integration +def test_the_package_imports_for_real_under_the_mocks(): + """P3.6: the package imports for real under the mocks - no exception. + + This is the strict version of the import smoke test: the root + ``__init__.py`` is executed and the three node mappings are exported. + """ + conftest = importlib.import_module("conftest") + package = conftest.execute_package_init() + assert sorted(package.NODE_CLASS_MAPPINGS) == PACK_NODE_IDS + assert sorted(package.NODE_DISPLAY_NAME_MAPPINGS) == PACK_NODE_IDS + + @pytest.mark.headless def test_the_package_imports_against_the_real_comfyui_tree(): """P3.2: the whole package imports against the real ComfyUI source tree."""