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(mcp): a declared float arrives as 0.0, so the collapse must compare

Aashish4a820d6cc5f3
diff --git a/tests/test_mcp.py b/tests/test_mcp.py
index 0643882b..34f65e46 100644
--- a/tests/test_mcp.py
+++ b/tests/test_mcp.py
@@ -1562,6 +1562,11 @@ def test_route_batch_tool_hooks_timeout_forwarding():
server_mod.laya_route_batch_tool(requests=BATCH_REQUESTS, hooks_timeout=0)
ok("route_batch_tool/hooks_timeout_zero_is_unset", seen["kwargs"]["hooks_timeout"] is None,
repr(seen["kwargs"]["hooks_timeout"]))
+ # A JSON client is free to send the default as `0.0` for a declared float, and `0.0 == 0`
+ # while `0.0 is 0` is False -- the collapse has to compare, not test identity.
+ server_mod.laya_route_batch_tool(requests=BATCH_REQUESTS, hooks_timeout=0.0)
+ ok("route_batch_tool/hooks_timeout_float_zero_is_unset",
+ seen["kwargs"]["hooks_timeout"] is None, repr(seen["kwargs"]["hooks_timeout"]))
server_mod.laya_route_batch_tool(requests=BATCH_REQUESTS)
ok("route_batch_tool/hooks_timeout_default_is_unset", seen["kwargs"]["hooks_timeout"] is None,
repr(seen["kwargs"]["hooks_timeout"]))