summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_enrich.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-04 02:20:57 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-04 02:20:57 +0200
commitd11e571c5b6c24b586ef5b8fb2cfcf6a6bfa6d6d (patch)
treefe3c4fbce3db02a8b84a15c413735622a51eefb0 /packages/meshbay-node/tests/test_enrich.py
parent7a4b905ddb64bdc92b7f9acf2ccde9bd84d7a6f3 (diff)
downloadmeshbay-d11e571c5b6c24b586ef5b8fb2cfcf6a6bfa6d6d.tar.gz
test(node): make the suite pass on Windows
- `.read_text()` on source files now `encoding="utf-8"` — cp1252 chokes on the em dashes / box-drawing chars those files contain. - test node.toml templates embed paths via `Path.as_posix()`: a raw Windows path in a basic TOML string is a parse error (`\U`, `\a`, ... are escapes). - new `test_platform.py` covers `meshbay_node.platform` by mocking `sys.platform` / `os.environ` — runs on both OSes. - `skipif(sys.platform == "win32")`, in `conftest.needs_subprocess` and inline, for the documented gaps: ffmpeg/ffprobe via asyncio subprocess (the win32 selector loop, forced for aiortc, cannot spawn one), the systemd `reload`/`restart-daemon` delegation (Windows path is W3), the keystore `st_mode == 600` assertion (NTFS ignores mode bits), and the symlink-escape test (needs Developer Mode). Windows: 781 passed, 25 skipped. No change on Linux. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/tests/test_enrich.py')
-rw-r--r--packages/meshbay-node/tests/test_enrich.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/meshbay-node/tests/test_enrich.py b/packages/meshbay-node/tests/test_enrich.py
index a35c713..75cf0ee 100644
--- a/packages/meshbay-node/tests/test_enrich.py
+++ b/packages/meshbay-node/tests/test_enrich.py
@@ -5,6 +5,8 @@ import shutil
import subprocess
from pathlib import Path
+import sys
+
import pytest
from meshbay_common.protocol import IndexEntry
@@ -131,7 +133,12 @@ def test_synthetic_episode_number_does_not_collide_across_per_season_bonus_folde
# ── end-to-end against a real (tiny, synthetic) video file ──────────────────
-pytestmark_ffmpeg = pytest.mark.skipif(not _HAVE_FFMPEG, reason="ffmpeg/ffprobe not installed")
+# ffprobe runs via asyncio subprocess, which the win32 selector loop (forced
+# for aiortc, see devel/windows-devel.md §5) cannot spawn.
+pytestmark_ffmpeg = pytest.mark.skipif(
+ not _HAVE_FFMPEG or sys.platform == "win32",
+ reason="needs ffprobe installed and a ProactorEventLoop",
+)
def _make_clip(path: Path) -> None: