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): read the README as UTF-8 so the suite runs on the Windows lane

thread3d4cc765a645ca
diff --git a/tests/test_mcp.py b/tests/test_mcp.py
index af5a4dd6..a70d93bd 100644
--- a/tests/test_mcp.py
+++ b/tests/test_mcp.py
@@ -2180,7 +2180,11 @@ def test_batch_item_shape_as_documented():
ok("schema/%s_item_shape" % tool, want in (by_name[tool].description or ""),
"documents %r" % want)
- readme = (Path(__file__).resolve().parents[1] / "README.md").read_text()
+ # `encoding="utf-8"` explicitly: the README is UTF-8 and contains non-ASCII (the language
+ # examples), while `Path.read_text()` defaults to the locale encoding -- cp1252 on the Windows
+ # runner, where the decode raised `UnicodeDecodeError` and this suite failed. It went unseen
+ # because the Windows lane ran this file without the `mcp` extra, so it skipped at the top.
+ readme = (Path(__file__).resolve().parents[1] / "README.md").read_text(encoding="utf-8")
marker = "one tool call takes an array of `{"
ok("docs/readme_names_the_batch_shape", marker in readme, "sentence not found")
if marker in readme: