Read pusher ghost test sources as UTF-8#7753
Conversation
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — only adds explicit UTF-8 encoding to file reads with no test-logic changes. Every bare read_text() call has been updated consistently, the fix is correct and complete, and no assertions or test structure were modified. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[pytest collects test_pusher_ghost_connections.py] --> B[Path.read_text called on pusher.py / transcribe.py]
B -->|Before fix - no encoding arg| C{OS default code page}
C -->|UTF-8 Linux/macOS| D[OK]
C -->|GBK / CP1252 Windows| E[UnicodeDecodeError — test collection fails]
B -->|After fix - encoding='utf-8'| F[Always reads as UTF-8]
F --> G[Tests pass on all platforms]
Reviews (1): Last reviewed commit: "Read pusher ghost connection test source..." | Re-trigger Greptile |
kodjima33
left a comment
There was a problem hiding this comment.
Backend test stabilization (Windows/UTF-8/optional-dep isolation) — approve only per policy.
|
Hey @tianmind-studio 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |
Summary
pusher.pyandtranscribe.pytest source snapshots with explicit UTF-8 encodingPath.read_text()failures duringtest_pusher_ghost_connections.pycollection when the default code page is GBKTesting
python -m pytest tests\unit\test_pusher_ghost_connections.py -q-> 43 passedpython -m black --line-length 120 --skip-string-normalization tests\unit\test_pusher_ghost_connections.py --checkpython -m py_compile tests\unit\test_pusher_ghost_connections.pygit diff --check origin/main...HEAD