fix: resolve UnicodeDecodeError in minimax tests on Windows - #600
fix: resolve UnicodeDecodeError in minimax tests on Windows#600sabya-code03 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe test suite now specifies UTF-8 when reading MiniMax example, environment, and README files. Test assertions and integration behavior remain unchanged. ChangesEncoding test updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
Summary
Describe the problem and fix in 2–5 bullets:
pyteston a Windows environment triggers aUnicodeDecodeError('charmap' codec can't decode byte...) intests/unit/test_minimax_example.py.cp1252), causing failures whenPath.read_text()attempts to parse special characters (like emojis or arrows) in theREADME.mdfiles during tests. This blocks Windows users from successfully running the local test suite.encoding="utf-8"arguments to allPath.read_text()calls withintests/unit/test_minimax_example.py.Change Type (select all that apply)
Scope (select all touched areas)
Linked Issue/PR
User-Visible / Behavior Changes
NoneSecurity Impact (required)
NoNoNoNoNoYes, explain risk + mitigation: N/AVerification
Environment
uv)Steps to Test
uv sync --devto set up the environment.uv run pytest tests/unit/test_minimax_example.pyExpected Behavior
MINIMAX_API_KEYis not set), and the files are read using UTF-8 encoding.Actual Behavior
UnicodeDecodeErrorcrashing the suite.Evidence (attach at least one)
Human Verification (required)
What you personally verified (not just CI):
test_minimax_example.pylocally on a Windows environment and verified the elimination ofUnicodeDecodeError.MINIMAX_API_KEYenvironment variable is not present.Compatibility / Migration
YesNoNoFailure Recovery (if this breaks)
tests/unit/test_minimax_example.pyRisks and Mitigations
NoneChecklist
uv run pytest)uv run pre-commit run --all-files)Summary by CodeRabbit