From e3bdb5830bffdb84b397d7cfcbb52e94f7f452ff Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 19 Apr 2026 06:24:27 -0500 Subject: [PATCH] Refactor test messages for clarity and consistency in regex tests --- mcp-server/run-tests.sh | 2 -- mcp-server/tests/unit/test_ui_screen_log.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mcp-server/run-tests.sh b/mcp-server/run-tests.sh index 34a8f7b74..c84a8f751 100755 --- a/mcp-server/run-tests.sh +++ b/mcp-server/run-tests.sh @@ -233,7 +233,6 @@ for _arg in "$@"; do esac done if [[ $_running_ui -eq 1 && $_cv2_ok -eq 0 ]]; then - # trunk-ignore(shellcheck/SC2059): color format strings are intentional printf '\033[33m[pre-flight] tests/ui tier detected, but opencv-python-headless is not installed — deselecting.\033[0m\n' printf ' install with: .venv/bin/pip install -e "mcp-server/.[ui]"\n' echo @@ -246,7 +245,6 @@ fi # recovery hook also benefits from having uhubctl available across the # whole suite. if ! command -v uhubctl >/dev/null 2>&1; then - # trunk-ignore(shellcheck/SC2059): color format strings needed for %b / escape sequences printf "\033[33m[pre-flight] uhubctl not found on PATH — recovery tier will skip, and\n" printf " wedged-device auto-recovery is disabled.\033[0m\n" printf " install with: brew install uhubctl (macOS) or apt install uhubctl (Debian/Ubuntu).\n" diff --git a/mcp-server/tests/unit/test_ui_screen_log.py b/mcp-server/tests/unit/test_ui_screen_log.py index f156aaac2..55029b38c 100644 --- a/mcp-server/tests/unit/test_ui_screen_log.py +++ b/mcp-server/tests/unit/test_ui_screen_log.py @@ -75,6 +75,6 @@ class TestRegexAnchoring: assert FRAME_RE.search("Screen: frame 0/0 name=home reason=next") is not None def test_regex_allows_unusual_names(self) -> None: - """Name is `\\S+`, so compound names with underscores/digits match.""" + r"""Name is `\S+`, so compound names with underscores/digits match.""" m = FRAME_RE.search("Screen: frame 5/10 name=nodelist_hopsignal reason=fn_f2") assert m is not None and m["name"] == "nodelist_hopsignal"