test(comfyui): tests offline para 15 builders/funciones puras sin test
Cubre 15 funciones del grupo comfyui (+ las 4 de comfyui-judge) que no tenian test, con tests offline (sin red, sin GPU, sin servidor ComfyUI): - 5 builders puros gamedev-2d: build_asset_variant, build_directional_sprite, build_inpaint_asset, build_outpaint_asset, build_sprite_from_sketch (estructura del workflow en API format + cableado + determinismo + error paths). - 3 impuras offline via PIL/stdlib: build_grid, flatten_alpha_on_color, read_png_metadata (PNGs reales en tmp, error paths). - 4 de comfyui-judge: score_aesthetic y score_clip_alignment por sus guards previos al subproceso torch; judge_image (panel) y critique_image_llm con la dependencia pesada monkeypatcheada. - 3 que componen otras funciones: resolve_workflow_deps, import_workflow_json, extract_recipe_from_png (dependencia de red monkeypatcheada o fallback offline). Cada .md actualizado con tested: true + test_file_path + tests. Cobertura del grupo comfyui (tag plano): 79 -> 90 con test (47 -> 36 sin). comfyui-judge: 0/4 -> 4/4. pytest: 101 passed; carpeta ml/tests: 376 passed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,9 +26,9 @@ params:
|
||||
- name: token
|
||||
desc: "Token OAuth; si vacio lo carga ask_llm_vision automaticamente. keyword-only."
|
||||
output: "dict {ok, verdict, score_0_10, reasons, error}. En exito ok=True, verdict 'good'|'bad', score_0_10 el score del modelo y reasons la lista de razones. En error (imagen invalida, API caida, 429, JSON no parseable) ok=False con error. Nunca lanza excepcion."
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
tested: true
|
||||
tests: ["_extract_json: fence json", "_extract_json: brace plano", "_extract_json: sin objeto -> ValueError", "flujo: veredicto estructurado good", "verdict ambiguo -> bad conservador", "API caida -> ok=False", "respuesta no parseable -> ok=False"]
|
||||
test_file_path: "python/functions/ml/tests/test_comfyui_critique_image_llm.py"
|
||||
file_path: "python/functions/ml/comfyui_critique_image_llm.py"
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user