Repository navigation
Commit 718aee9
Use UTF-8 when reading Bedrock test fixtures (#3530)
## Summary
- Read Bedrock JSON/JSONL fixture files with `encoding="utf-8"` instead
of the platform default encoding.
- Keep the opt-in Bedrock live env-file reader deterministic across
developer machines.
## Problem
These test fixtures and optional live-test env files are text inputs
with repo-controlled formats, but `Path.read_text()` defaults to the
host locale. On Windows or other non-UTF-8 locales, that can make the
Bedrock tests less portable than they need to be.
## Before / After
Before: Bedrock fixture loading depended on the platform default text
encoding.
After: the fixture and env-file readers explicitly decode as UTF-8.
## Verification
- `python -m py_compile tests/lib/test_bedrock_auth_conformance.py
tests/lib/bedrock_live.py`
- `uv run --with pytest --with pytest-asyncio --with pytest-xdist --with
jsonschema --with respx --with botocore python -m pytest -q
tests/lib/test_bedrock_auth_conformance.py` (`20 passed`)
Co-authored-by: Marcus Wood <marcuswood@openai.com>1 parent 43045fc commit 718aee9
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments