From 519c47841787ed7a29140df2dfb9c48b47cc414e Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Mon, 5 Oct 2026 17:40:34 +0200 Subject: test: read UTF-8 explicitly in the licensing and keyring-vector tests On Windows a bare `read_text()` or `subprocess.run(text=True)` decodes with the locale's code page (cp1252), not UTF-8. `test_licensing.py` then failed on a byte of the vendored LICENSES.txt, and `test_keyring_vectors.py` decoded the generator's output, which carries CJK test strings, into something that no longer matched keyring.json. Both files are UTF-8; say so. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/tests/test_keyring_vectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/meshbay-hub') diff --git a/packages/meshbay-hub/tests/test_keyring_vectors.py b/packages/meshbay-hub/tests/test_keyring_vectors.py index 3928965..ee4994d 100644 --- a/packages/meshbay-hub/tests/test_keyring_vectors.py +++ b/packages/meshbay-hub/tests/test_keyring_vectors.py @@ -45,7 +45,7 @@ def test_the_file_is_what_the_shipped_keyring_writes(): to either that alters a bundle or a transcript fails here first — which is the moment to decide whether it is a format change every client must make.""" out = subprocess.run(["node", str(GENERATOR)], capture_output=True, text=True, - timeout=120, check=True).stdout + encoding="utf-8", timeout=120, check=True).stdout assert json.loads(out) == _vectors(), ( "keyring.js or transcripts.js no longer produce tests/vectors/keyring.json; " "if the format change is deliberate, regenerate it and update every client") -- cgit v1.2.3