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(calibrate): read the clamp-vs-refuse claim where the page makes it

Aashishb85a62efb07c
diff --git a/tests/test_calibrate.py b/tests/test_calibrate.py
index 90155801..8411febb 100644
--- a/tests/test_calibrate.py
+++ b/tests/test_calibrate.py
@@ -709,8 +709,12 @@ check("contract/the summary line names all three installed fields",
check_true("contract/the summary line calls it a copy of three, not two",
_summary_line.startswith("Copy `temperature`, `temperature_by_options` and `binning_map`"),
_summary_line)
+# The split has to be stated *as* the split: "clamp" and "refuse" both appear elsewhere in this
+# page whatever it says, so the check reads the window that follows the contrast it is claiming.
+_contrast = "opposite value policies"
+_policy_window = (_apply_doc.split(_contrast)[-1][:500] if _contrast in _apply_doc else "")
check_true("contract/the docstring states the clamp-vs-refuse split, not one policy for both",
- "clamp" in _apply_doc and "refuse" in _apply_doc, _apply_doc[:200])
+ "clamp" in _policy_window and "refus" in _policy_window, _apply_doc[:200])
check_true("contract/the docstring says a keyless file clears the map, not leaves it",
"installs `None`" in _apply_doc and "clears" in _apply_doc, _apply_doc[:300])
# The pre-fix wording, banned so the count claim cannot come back.