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.
This commit is contained in:
Ouroboros 2026-09-17 23:35:51 +03:00
parent 7298277d95
commit aaa3d70424

View file

@ -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,