Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

test(agent): name the check that fails when the count is missing

Aashishc78bac4cabe4
diff --git a/tests/test_predict_long.py b/tests/test_predict_long.py
index a174b689..1ba54c84 100644
--- a/tests/test_predict_long.py
+++ b/tests/test_predict_long.py
@@ -75,8 +75,8 @@ a = make_agent(lambda s, q: [])
short = a.predict_long({"body": "x" * 50}, Q) # 50 tokens <= budget 72
check("short/delegates to system_one", short["answers"], {"_via": "system_one"})
check("short/no predict_batch call", a._calls["batch_states"], None)
-check("short/one window is reported", short["usage"]["windows"], 1)
-check("short/system_one's own usage is kept", short["usage"]["input_tokens"], 1)
+check("short/one window is reported", short["usage"].get("windows", "<absent>"), 1)
+check("short/system_one's own usage is kept", short["usage"].get("input_tokens", "<absent>"), 1)
# 1b. the count is added to a copy, because a start hook that skips hands back the caller's own
# payload dict and that object may be cached and reused