From f68e8f90d2332eab351d0dd1596d27f87112fe7e Mon Sep 17 00:00:00 2001 From: Patrick Gilhooley <113308245+pgil256@users.noreply.github.com> Date: Mon, 8 Jun 2026 14:46:39 -0400 Subject: [PATCH] test: make eval-smoke + yolo tests pass on Windows - _write_manifest now TOML-escapes backslashes, so tmp_path manifests with C:\... paths parse (\U was an invalid TOML unicode escape, so the 8 smoke tests failed only on Windows). - yolo default-checkpoint assertion uses Path.as_posix() instead of a hard-coded forward-slash str().endswith(). No-op on POSIX CI; unblocks the local Windows run. The 17 video tests also needed cv2, which the dev extra already declares (pip install -e .[dev]). Co-Authored-By: Claude Opus 4.8 --- tabvision/tests/integration/test_composite_eval_smoke.py | 3 ++- tabvision/tests/unit/test_yolo_backend.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tabvision/tests/integration/test_composite_eval_smoke.py b/tabvision/tests/integration/test_composite_eval_smoke.py index a036b8c..3980944 100644 --- a/tabvision/tests/integration/test_composite_eval_smoke.py +++ b/tabvision/tests/integration/test_composite_eval_smoke.py @@ -64,7 +64,8 @@ def _write_manifest( for entry in entries: lines.append("[[clips]]") for key, value in entry.items(): - lines.append(f'{key} = "{value}"') + escaped = value.replace("\\", "\\\\").replace('"', '\\"') + lines.append(f'{key} = "{escaped}"') lines.append("") manifest_path.write_text("\n".join(lines), encoding="utf-8") diff --git a/tabvision/tests/unit/test_yolo_backend.py b/tabvision/tests/unit/test_yolo_backend.py index b6b6e01..e20157b 100644 --- a/tabvision/tests/unit/test_yolo_backend.py +++ b/tabvision/tests/unit/test_yolo_backend.py @@ -35,7 +35,7 @@ def test_default_checkpoint_path_uses_data_root(monkeypatch): monkeypatch.setenv("TABVISION_DATA_ROOT", "/tmp/tv-test-root") monkeypatch.delenv(DEFAULT_CHECKPOINT_ENV, raising=False) p = _default_checkpoint_path() - assert str(p).endswith("/tmp/tv-test-root/models/guitar-yolo-obb-finetuned.pt") + assert p.as_posix().endswith("/tmp/tv-test-root/models/guitar-yolo-obb-finetuned.pt") def test_env_overrides_default_checkpoint(monkeypatch, tmp_path):