From 77a206894f9f4457bcd21b5fb1b86e267c9dc0b3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Nov 2026 12:11:57 +0000 Subject: [PATCH] Node test limits: 120 s like the other node tests pytest-windows timed out a sub-second node run of the version-reload test after 30 s on a busy runner. The remaining node subprocess tests with a 30 s limit get the 120 s the others use, so the limit catches a hang only. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018i4GUgHR8PXDGer54DH6ie --- tests/test_commander_version_reload.py | 5 ++++- tests/test_label_layout.py | 4 ++-- tests/test_web_map_zoom.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test_commander_version_reload.py b/tests/test_commander_version_reload.py index 1ea742be..9fc68c84 100644 --- a/tests/test_commander_version_reload.py +++ b/tests/test_commander_version_reload.py @@ -45,8 +45,11 @@ m.setPageVersion({meta}); const results = {json.dumps(host_versions)}.map((v) => m.checkHostVersion(v)); console.log(JSON.stringify({{ reloads, results }})); """ + # The script takes well under a second; a busy Windows runner has been + # seen to hold a node start for over 30 s (CI of 1.3.303), so the limit + # only catches a hang, as in the other node tests. out = subprocess.run([node, "--input-type=module", "-e", script], check=True, - capture_output=True, text=True, timeout=30).stdout + capture_output=True, text=True, timeout=120).stdout return json.loads(out) diff --git a/tests/test_label_layout.py b/tests/test_label_layout.py index 9f9f72ec..c9a8e4ee 100644 --- a/tests/test_label_layout.py +++ b/tests/test_label_layout.py @@ -86,7 +86,7 @@ def test_web_twin_slides_edge_labels_apart_too(): "for (const dx of [0, 8, -5, 3]) out.push(f.place(110, 16, around(300 + dx, -900, 110, 16)));" "console.log(JSON.stringify({out, edge: edgeAnchor(600, 400, 300, -900)}));") result = subprocess.run([node, "--input-type=module", "-e", script], - capture_output=True, text=True, check=True, timeout=30) + capture_output=True, text=True, check=True, timeout=120) data = json.loads(result.stdout) rects = [pygame.Rect(r["x"], r["y"], r["w"], r["h"]) for r in data["out"]] for a, b in itertools.combinations(rects, 2): @@ -172,7 +172,7 @@ def test_web_twin_keeps_labels_off_lines_and_remembers_spots(): "const east = beside(200, 150, 60, 14, 90)[0];" "console.log(JSON.stringify({a, b, east}));") result = subprocess.run([node, "--input-type=module", "-e", script], - capture_output=True, text=True, check=True, timeout=30) + capture_output=True, text=True, check=True, timeout=120) data = json.loads(result.stdout) a = pygame.Rect(data["a"]["x"], data["a"]["y"], data["a"]["w"], data["a"]["h"]) assert not a.inflate(2, 2).clipline((100, 100), (180, 100)) diff --git a/tests/test_web_map_zoom.py b/tests/test_web_map_zoom.py index ef130687..a64a4f35 100644 --- a/tests/test_web_map_zoom.py +++ b/tests/test_web_map_zoom.py @@ -20,7 +20,7 @@ def _run(script: str) -> dict: module = (JS / "core" / "map-zoom.js").as_uri() result = subprocess.run( [node, "--input-type=module", "-e", f"import * as z from {json.dumps(module)};\n{script}"], - capture_output=True, text=True, timeout=30, check=True) + capture_output=True, text=True, timeout=120, check=True) return json.loads(result.stdout)