mirror of
https://github.com/rehan-remade/universal-modder.git
synced 2026-11-05 01:37:40 +00:00
[PR #222] [MERGED] tests: cover um kb search on a cp1252 console #225
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rehan-remade/universal-modder#225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rehan-remade/universal-modder/pull/222
Author: @Ramnath0521
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @rehan-remade
Base:
main← Head:test/cli-cp1252-search📝 Commits (3)
69649eetests: cover um kb search on a cp1252 consolee95f493tests: keep the in-process cp1252 test next to the subprocess one959bf30Merge remote-tracking branch 'origin/main' into land/pr-222📊 Changes
1 file changed (+16 additions, -0 deletions)
View changed files
📝
tests/test_um.py(+16 -0)📄 Description
Follow-up to #184, as suggested there. Refs #152.
This adds only the in-process test; no source change. It runs
cli.main(["kb", "search", ...])against a note containing≥and→, withsys.stdoutreplaced by a cp1252 text wrapper over a byte buffer, and checks that the output arrives as UTF-8. That is the path #152 reported (um kb searchprinting hit snippets), which the subprocess test in #154 does not exercise (it runsum kb show).I checked it against current
mainon Windows 11 / Python 3.12:reconfigure()call inum/cli.pyit fails withUnicodeEncodeError: 'charmap' codec can't encode character '\u2265', so it does guard the fix.Written with AI assistance (Claude Code). I ran the test on my own Windows machine, read the diff, and verified it passes with the fix and fails without it. Errors are mine.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.