Read translation optimization source tests as UTF-8#7782
Read translation optimization source tests as UTF-8#7782tianmind-studio wants to merge 1 commit into
Conversation
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — the change is a three-line encoding fix in a test file with no impact on production code. The change exclusively adds encoding='utf-8' to file-read calls in tests. All three relevant open() calls in the file now carry the explicit encoding; no test logic or assertions were altered. The fix is portable and correct. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "Read translation optimization source tes..." | Re-trigger Greptile |
Summary
transcribe.pyandtranslation_coordinator.pysource snapshots as UTF-8 intest_translation_optimization.py.Windows reproduction
Before this change on Windows with the default GBK locale:
python -m pytest tests\unit\test_translation_optimization.py -q->2 failed, 90 passedUnicodeDecodeError: 'gbk' codec can't decode byte ...while readingrouters/transcribe.pyandutils/translation_coordinator.pyTesting
python -m pytest tests\unit\test_translation_optimization.py -q->92 passedpython -m black --line-length 120 --skip-string-normalization tests\unit\test_translation_optimization.py --checkpython -m py_compile tests\unit\test_translation_optimization.pygit diff --check origin/main...HEAD