Files
darth-veitcher-comfydv/__init__.py
T
darth-veitcher 130c57f88b Add comprehensive pytest test suite and fix FormatString node issues
- Fixed Jinja2 regex pattern to handle spaces around filters ({{ var | filter }})
- Added null safety in IS_CHANGED method for empty/None templates
- Restored dynamic output functionality for variable chaining
- Created 47 comprehensive tests with 78% coverage on format_string.py
- Set up test infrastructure with ComfyUI dependency mocking
- Used importlib to bypass package imports during testing
- Added conditional imports in root __init__.py for test compatibility
- Configured pytest in pyproject.toml (removed outdated pytest.ini)
- Added pytest and pytest-cov to dev dependencies
- Updated .gitignore for test artifacts
- Removed deprecated model_unload.py
2025-11-05 11:59:31 +00:00

22 lines
787 B
Python

"""
@author: Darth Veitcher
@title: Comfy DV Nodes
@nickname: DV Nodes
@description: This collection of nodes provides string formatting, random choices, model memory management, and other quality of life improvements.
"""
import sys
# Only import when not running pytest (to avoid ComfyUI dependency issues during testing)
if "pytest" not in sys.modules:
from .src.comfydv import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
WEB_DIRECTORY = "./src/js"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
else:
# When running tests, provide empty exports
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
WEB_DIRECTORY = "./src/js"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]