← Commit history

verb tests: round-two fixes

John Lauer ·ddb644f6be ·1mo ago ·parent cabeaae
1 file changed +6−4
tests/run_verb_tests.py+6−4
@@ -21,6 +21,7 @@ import argparse, datetime, json, os, pathlib, subprocess, sys, time REPO = pathlib.Path(__file__).resolve().parent.parent sys.path.insert(0, str(REPO)) import describe  # noqa: E402+CATALOG_TIMEOUTS = {v[0]: v[3] for v in describe._T}  THREAD = "fusion-verb-tests" SCRATCH = "C:/Users/john/AppData/Local/Temp/fusion-verb-tests"@@ -65,7 +66,7 @@ def expect(d, spec):         errs.append("expected >0 results")     if spec.get("pred") == "verbs_match_plan":         got = {v["name"] if isinstance(v, dict) else v for v in (d.get("verbs") or [])}-        planned = set(PLAN.keys())+        planned = {k.split("#")[0] for k in PLAN}         if got and (got - planned): errs.append("verbs described but UNTRIAGED in test plan: %s" % sorted(got - planned)[:6])     if spec.get("pred") == "must_refuse" and not (d.get("success") is False or d.get("error")):         errs.append("expected a refusal, got success")@@ -140,8 +141,8 @@ OPEN = {"fileName": "BQ25792", "projectName": "Main", "folderPath": "Molecules/X t("fusion_open_cloud_file", "daily", dict(OPEN, **{"_pollDoc": "BQ25792", "_pollSec": 180}), {"ok": True}, "fire-and-poll: cloud opens outlive the relay timeout") t("fusion_show_schematic", "daily", {}, {"ok": True}) t("fusion_show_2d_board", "daily", {}, {"ok": True})+t("fusion_board_info", "daily", {}, {"ok": True, "fields": ["rawXml"]}, "needs the 2D board view ACTIVE - ordering matters") t("fusion_show_3d_board", "daily", {}, {"ok": True})-t("fusion_board_info", "daily", {}, {"ok": True, "fields": ["rawXml"]}) t("fusion_inspect_bodies", "daily", {}, {"ok": True, "fields": ["bodies", "units"]}) t("fusion_assembly_bom", "daily", {}, {"ok": True, "fields": ["parts", "collapsedUnits", "possibleUnderCollapse"]}) t("fusion_physical_properties", "daily", {}, {"ok": True})@@ -157,7 +158,7 @@ t("fusion_assembly_bom#guard", "negative",   {"expectDocument": "ZZZ_NoSuchDoc_TEST"}, {"errorCode": "wrong_document"}) t("fusion_run_modeling_script", "daily",   {"script": "result = {'ok': True}", "expectDocument": "BQ25792"}, {"ok": True})-t("fusion_execute_text_command", "daily", {"command": "Commands.List", "expectDocument": "BQ25792"}, {"ok": True})+t("fusion_execute_text_command", "daily", {"command": "Electron.ImmediateRepaint /full", "expectDocument": "BQ25792"}, {"ok": True}, "benign repaint used by electron_view.py itself") t("fusion_electron_run", "weekly", {"command": "WINDOW FIT;"}, {"ok": True}, "board view must be active") t("fusion_electron_zoom", "weekly", {"factor": 1.0}, {"ok": True}) t("fusion_electron_pan", "weekly", {"dx": 0, "dy": 0}, {"ok": True})@@ -226,10 +227,11 @@ def main():             results.append({"verb": name, "status": "SKIP", "why": "dynamic fixture not staged this run"})             continue         verb = name.split("#")[0]+        vt = max(90, CATALOG_TIMEOUTS.get(verb, 60) + 30)         if "_pollDoc" in spec["args"]:             d, dt = call_polled(a.target, verb, spec["args"], spec["args"]["_pollDoc"], spec["args"]["_pollSec"])         else:-            d, dt = call(a.target, verb, spec["args"])+            d, dt = call(a.target, verb, spec["args"], timeout=vt)         errs = expect(d, spec["exp"])         if name.startswith("fusion_search_cloud_files") or name.startswith("fusion_walk_cloud_tree"):             # must refuse: success:true here is the FAILURE