diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-05 17:40:34 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-07 22:22:51 +0200 |
| commit | 519c47841787ed7a29140df2dfb9c48b47cc414e (patch) | |
| tree | 13f611ac754d65b3aa7f1d161c1719e95dba7624 /packages/meshbay-hub/tests/test_keyring_vectors.py | |
| parent | 462d76898a306981fbeac859cd54da1468e80639 (diff) | |
| download | meshbay-519c47841787ed7a29140df2dfb9c48b47cc414e.tar.gz | |
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 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_keyring_vectors.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_keyring_vectors.py | 2 |
1 files changed, 1 insertions, 1 deletions
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") |