From e0668f60b8aa5a49b6198d730e1d7a8f39b5e575 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Mar 2026 12:48:50 +0000 Subject: [PATCH 1/2] Fix contract test UTF-8 encoding for Windows compatibility The YAML spec file contains non-ASCII characters that fail to decode on Windows with the default cp1252 encoding. Explicitly open with encoding="utf-8". --- tests/test_contract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_contract.py b/tests/test_contract.py index 284ccf2..48f0d4c 100644 --- a/tests/test_contract.py +++ b/tests/test_contract.py @@ -20,7 +20,7 @@ # --------------------------------------------------------------------------- def _load_spec() -> dict: - with open(SPEC_PATH) as f: + with open(SPEC_PATH, encoding="utf-8") as f: return yaml.safe_load(f) From f72545778111f15e062bd9ca68a2514964743fba Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Mar 2026 12:52:29 +0000 Subject: [PATCH 2/2] Fix ruff import sorting in contract and integration tests --- tests/integration/test_live_server.py | 1 + tests/test_contract.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_live_server.py b/tests/integration/test_live_server.py index 0273b50..d4f23f3 100644 --- a/tests/integration/test_live_server.py +++ b/tests/integration/test_live_server.py @@ -3,6 +3,7 @@ Skipped unless CYCLES_BASE_URL is set. """ import os + import pytest pytestmark = pytest.mark.skipif( diff --git a/tests/test_contract.py b/tests/test_contract.py index 48f0d4c..54c7a5e 100644 --- a/tests/test_contract.py +++ b/tests/test_contract.py @@ -2,9 +2,8 @@ from __future__ import annotations -import pathlib - import copy +import pathlib import pytest import yaml