Files
MajoorWaldi-ComfyUI-Majoor-…/tests/compat/test_import_smoke.py
T
EwaldandClaude Sonnet 5 815993aae0 feat(nodes): migrate to ComfyUI Nodes V3 API
MajoorGenInfoOverride/MajoorSaveImage/MajoorSaveVideo now use
comfy_api.latest.io.ComfyNode (define_schema/execute) exposed via
comfy_entrypoint(), replacing the legacy NODE_CLASS_MAPPINGS dict style.
node_id values are unchanged so existing saved workflows keep resolving
to the same node classes.

Also bumps @comfyorg/comfyui-frontend-types to 1.54.3 (was pinned to
1.47.12) so JS typechecking matches the frontend versions ComfyUI
actually ships.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 19:44:28 +02:00

23 lines
966 B
Python

import importlib.util
import inspect
from pathlib import Path
def test_import_exposes_expected_public_symbols():
module_path = Path(__file__).resolve().parents[2] / "__init__.py"
spec = importlib.util.spec_from_file_location("mjr_am_ext", module_path)
module = importlib.util.module_from_spec(spec)
assert spec and spec.loader
spec.loader.exec_module(module)
assert hasattr(module, "init_prompt_server")
assert callable(module.init_prompt_server)
# ComfyUI Nodes V3: node classes are exposed via an async comfy_entrypoint()
# returning a ComfyExtension, not via legacy NODE_CLASS_MAPPINGS.
assert hasattr(module, "comfy_entrypoint")
assert callable(module.comfy_entrypoint)
assert inspect.iscoroutinefunction(module.comfy_entrypoint)
assert hasattr(module, "WEB_DIRECTORY")
assert isinstance(module.WEB_DIRECTORY, str)
assert hasattr(module, "__version__")
assert isinstance(module.__version__, str)