@davoodmehraban89 / Aram-1 / commits / da06ab3
Fork 0

test(windows): distinguish missing Tcl runtime from UI regression

davoodmehraban89 committed Nov 1, 2026 at 20:54 UTC da06ab3c37d789e565245f2f6ee38183a6f66fb6
1 file changed +12 -1
backend/tests/test_desktop_five_statement.py
+12 -1
@@ -289,7 +289,18 @@ def test_new_detail_query_supersedes_inflight_search_and_ignores_stale_reply(
289 monkeypatch.setattr(desktop_module, "filter_preview_details", delayed_filter)
290 paths = fixtures(tmp_path)
291 file_names = {"workbook": str(paths[0]), "manifest": str(paths[1])}
292 - window = FiveStatementWindow(picker=lambda kind: file_names[kind])
292 + try:
293 + window = FiveStatementWindow(picker=lambda kind: file_names[kind])
294 + except Exception as exc:
295 + # Hosted Windows Python images can lack Tcl/Tk runtime files.
296 + # Skip only missing runtime, never application behavior errors.
297 + import tkinter
298 + if isinstance(exc, tkinter.TclError) and (
299 + "usable tk.tcl" in str(exc)
300 + or "no display name" in str(exc)
301 + ):
302 + pytest.skip(f"Native Tk runtime unavailable on runner: {exc}")
303 + raise
304 try:
305 window.withdraw()
306 window.workbook_button.invoke()