Files
IxMxAMAR-ComfyUI-Utility-Me…/tests/unit/test_base_errors.py
T
IxMxAMAR 15e4b0da4e release(v0.1.2): fix critical loader collision + 6 Gemini-review findings
Critical:
- rename nodes/ -> mp_nodes/, shared/ -> mp_shared/ to avoid shadowing
  ComfyUI core's nodes.py via sys.path injection (root cause of v0.1.1
  'nodes is not a package' startup failure)
- http_post now streams response and enforces 50MB cap mid-stream (DoS)
- AES key derivation: HKDF -> PBKDF2-HMAC-SHA256 600k iters + random salt
  (work factor against weak-key brute force; ciphertext format changed)
- fs_mkdir/copy/move/delete confined to ComfyUI input/output/temp + ~ by
  default; UTILITY_MEGAPACK_ALLOW_ARBITRARY_PATHS=1 to override

UX / correctness:
- combo settings now declare options array (themes dropdown was empty)
- LATENT default 1x4x8x8 zeros -> {} (avoids Flux/SD3 shape crashes)
- @op decorator rejects reserved widget names mode/theme at register time
- _pad_outputs docstring updated to match relaxed opaque-type behavior
2026-05-13 21:36:54 +05:30

20 lines
623 B
Python

"""Tests for OutputNotProducedError — raised when opaque-type slots are wired but unfilled."""
from mp_nodes._base import OutputNotProducedError
def test_error_is_runtime_error_subclass():
assert issubclass(OutputNotProducedError, RuntimeError)
def test_error_message_includes_slot_name_and_op_id():
err = OutputNotProducedError(slot_name="model", op_id="for_loop")
assert "model" in str(err)
assert "for_loop" in str(err)
def test_error_attributes_are_accessible():
err = OutputNotProducedError(slot_name="clip", op_id="echo")
assert err.slot_name == "clip"
assert err.op_id == "echo"