From 18aae66a1335525568343bb4a2b227dc4fe83d5d Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sat, 12 Sep 2026 06:44:01 -0700 Subject: [PATCH] chore(tests): explicit utf-8 encoding in test_mcp_config (windows-footgun ratchet) --- tests/hermes_cli/test_mcp_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/hermes_cli/test_mcp_config.py b/tests/hermes_cli/test_mcp_config.py index f261c9b1be..1673af08ac 100644 --- a/tests/hermes_cli/test_mcp_config.py +++ b/tests/hermes_cli/test_mcp_config.py @@ -65,7 +65,7 @@ def _seed_config(tmp_path: Path, mcp_servers: dict): config = {"mcp_servers": mcp_servers, "_config_version": 9} config_path = tmp_path / "config.yaml" - with open(config_path, "w") as f: + with open(config_path, "w", encoding="utf-8") as f: yaml.safe_dump(config, f) @@ -162,7 +162,7 @@ class TestMcpRemove: token_dir = tmp_path / "mcp-tokens" token_dir.mkdir() token_file = token_dir / "oauth-srv.json" - token_file.write_text("{}") + token_file.write_text("{}", encoding="utf-8") from hermes_cli.mcp_config import cmd_mcp_remove @@ -771,7 +771,7 @@ class TestMcpLogin: def mock_probe(name, cfg, connect_timeout=30): seen["connect_timeout"] = connect_timeout token_dir.mkdir(exist_ok=True) - (token_dir / "realserver.json").write_text('{"access_token": "x"}') + (token_dir / "realserver.json").write_text('{"access_token": "x"}', encoding="utf-8") return [("a", "d"), ("b", "d"), ("c", "d")] monkeypatch.setattr(