From aaa3d704242399ecd1962ec30961f05aa6fc5704 Mon Sep 17 00:00:00 2001 From: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com> Date: Thu, 17 Sep 2026 23:35:51 +0300 Subject: [PATCH] Read the accounting test fixtures as UTF-8 The Windows full-test leg runs Python without UTF-8 mode, so a bare Path.read_text() decodes with the locale codepage. The payloads here are ASCII today; the explicit encoding keeps the test honest when they are not. --- tests/test_request_wire_accounting_disclosure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_request_wire_accounting_disclosure.py b/tests/test_request_wire_accounting_disclosure.py index 60a721654..60c3c39a3 100644 --- a/tests/test_request_wire_accounting_disclosure.py +++ b/tests/test_request_wire_accounting_disclosure.py @@ -122,7 +122,7 @@ def wire_env(tmp_path, monkeypatch): def _store(evidence): path = evidence / "state" / wire.REQUEST_WIRE_STATE_FILE - return json.loads(path.read_text()) if path.exists() else None + return json.loads(path.read_text(encoding="utf-8")) if path.exists() else None def _learned_actions(evidence): @@ -136,7 +136,7 @@ def _learned_actions(evidence): def _rows(root): path = root / ua.LEDGER_REL - return [json.loads(line) for line in path.read_text().splitlines() if line.strip()] + return [json.loads(line) for line in path.read_text(encoding="utf-8").splitlines() if line.strip()] def _capture(candidate, *, state="settled", attempt="attempt-wire", digest=None,