From 273755ab421d85bea976031fa4af7411acdeb72d Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 26 Jul 2026 15:54:34 +0000 Subject: [PATCH] Fix the GGUF variant contract test against the merged handler signature The assertion pinned the exact single-line call handleVariantClick(v.quant, v.downloaded, expectedBytes, v.filename), but the handler takes (quant, filename, downloaded, sizeBytes) and prettier wraps the call across lines, so the mandatory repository test job failed on every push. Match the call structurally and assert the filename really is forwarded in the handler's argument order. --- tests/studio/test_model_picker_contracts.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/studio/test_model_picker_contracts.py b/tests/studio/test_model_picker_contracts.py index c13e0851e7..07575b1c24 100644 --- a/tests/studio/test_model_picker_contracts.py +++ b/tests/studio/test_model_picker_contracts.py @@ -588,8 +588,12 @@ def test_variant_expander_forwards_the_gguf_filename(): handler = re.search(r"const handleVariantClick = useCallback\(.*?\n \);", src, re.S) assert handler, "handleVariantClick not found" assert "ggufFilename: filename," in handler.group(0) - # The call site has to actually pass it through. - assert "handleVariantClick(v.quant, v.downloaded, expectedBytes, v.filename)" in src + # The call site has to actually pass it through, in the handler's argument order. + # Matched structurally: prettier wraps the call across lines once it grows. + call = re.search(r"handleVariantClick\(([^)]*)\)", src) + assert call, "handleVariantClick call site not found" + args = [a.strip() for a in call.group(1).split(",") if a.strip()] + assert args[:2] == ["v.quant", "v.filename"], args def test_diffusion_pages_never_drop_a_gguf_pick_silently():