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: labels
|
||||
desc: "rotulos opcionales, uno por imagen (mismo orden); reservan una franja bajo cada celda."
|
||||
output: "dict con ok (bool), out_path (str, ruta del PNG generado), rows (int, filas), cols (int, columnas), error (str, vacio si OK)."
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
tested: true
|
||||
tests: ["grid basico: ok + out_path + cols/rows (ceil(sqrt(N)))", "cols explicito define filas", "cell define dimension del canvas", "labels reservan franja bajo cada celda", "error: lista vacia", "error: ruta inexistente", "determinismo del dict de salida"]
|
||||
test_file_path: "python/functions/ml/tests/test_comfyui_build_grid.py"
|
||||
file_path: "python/functions/ml/comfyui_build_grid.py"
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user