From de8b5b5dc08712cc74c01bbb1af79639283df7b9 Mon Sep 17 00:00:00 2001 From: bradautomates Date: Fri, 25 Sep 2026 09:46:09 +1000 Subject: [PATCH] test: read SKILL.md as UTF-8 and write VTT fixtures as bytes on Windows Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/test_packaging.py | 6 +++--- tests/test_transcribe.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_packaging.py b/tests/test_packaging.py index 2746012..e03376c 100644 --- a/tests/test_packaging.py +++ b/tests/test_packaging.py @@ -12,10 +12,10 @@ ROOT = Path(__file__).resolve().parents[1] def test_release_versions_match_canonical_skill(): skill = ROOT / 'skills/watch/SKILL.md' - version = re.search(r'^version: "([^"]+)"', skill.read_text(), re.M).group(1) + version = re.search(r'^version: "([^"]+)"', skill.read_text(encoding='utf-8'), re.M).group(1) for relative in ('.claude-plugin/plugin.json', '.codex-plugin/plugin.json'): - assert json.loads((ROOT / relative).read_text())['version'] == version - assert json.loads((ROOT / '.codex-plugin/plugin.json').read_text())['skills'] == './skills/' + assert json.loads((ROOT / relative).read_text(encoding='utf-8'))['version'] == version + assert json.loads((ROOT / '.codex-plugin/plugin.json').read_text(encoding='utf-8'))['skills'] == './skills/' assert not (ROOT / 'commands').exists() diff --git a/tests/test_transcribe.py b/tests/test_transcribe.py index 95d15d8..38cf5ca 100644 --- a/tests/test_transcribe.py +++ b/tests/test_transcribe.py @@ -5,7 +5,7 @@ from transcribe import parse_vtt, normalize_segments def parse(tmp_path, body): path = tmp_path / 'captions.vtt' - path.write_text(body, encoding='utf-8') + path.write_bytes(body.encode('utf-8')) # Exact bytes: text mode on Windows would turn \r\n into \r\r\n. return parse_vtt(str(path))