test(docs): make the UTF-8 pipe fixture portable on Windows #493
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8015c9a
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!493
Loading…
Reference in a new issue
No description provided.
Delete branch "monsterlag/Longshot:fix/catalogue-pipe-newlines"
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?
Why
The catalogue's UTF-8 pipe check fails on Windows because its authored text stream translates LF into CRLF while the assertion expects LF bytes. That makes the full contributor suite report an encoding failure even though UTF-8 reconfiguration works.
What changed
tests/test_tested_configurations.py: give the authoredTextIOWrapperan explicit LF newline policy. Its initial ASCII encoding, arrow-containing input and byte-for-byte UTF-8 assertion are unchanged. Product output is unchanged.docs/tested/files record the interleaved, game-free comparisons under the current contribution format.Flags and settings
None.
Measurements
main:
9c9d69ed09(2026-11-14)this PR: fix/catalogue-pipe-newlines @
5a7d656a03Hardware: Ryzen7 9800X3D, 96GiB RAM, Windows11 build26300, native Python3.14.7; no GPU used.
Scene: the authored stream and catalogue fixtures, not a game scene.
Method: two sequential interleaved main/PR/main/PR runs of the whole25-case file on the same PC, with native Windows newline behavior. No performance claim. The source fix measured at07d7b7a0 is unchanged in the final record-only commit.
How to reproduce: run
python -I -B tests/test_tested_configurations.pyon both checkouts using native Windows Python. The encoding test constructs an ASCII stream, invokes production UTF-8 setup, flushes it and compares its bytes with the rendered source.9c9d69ed5a7d656aTesting
Tested: two native Windows full-file pairs above (all25 cases pass here); independent read-only review confirmed the original assertion/ASCII input remain intact; final25-case check also validates the added run fragments. Full
python -I -B tests/run_all.py --jobs8: 534 passed, 2 failed, 34 skipped in159s. Both remaining groups also fail on untouched main9c9d69ed in fresh focused runs:test_oot_state_tap.py(Windows bridge connection race, issue481) andtest_walk_key.py(missing stand-in after Skip-title merged, already claimed by mooki). No assertions were weakened or skips added.git diff --checkpasses.Not tested: native Linux/macOS execution or actual OS pipe/console integration. This fixture deliberately uses an in-memory stream; issue481 is separate. The one-line test-only change does not run in the game.
Needs other testers: None for this authored-fixture portability correction.
Screenshots
Nothing on screen.
Risk and rollback
Only the stand-in's newline conversion changes; the byte assertion still requires production UTF-8 output. Reverting the one-line change restores the platform-dependent test behavior.
Reviewer notes
Read line272 beside line276. Setting the stand-in's newline policy makes its existing byte contract explicit; normalizing or weakening the assertion was unnecessary. The four run records contain CPU-only tool results and make no GPU/gameplay claim.
Issues
Fixes #482
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md; no appended row or assembled view).tests/that reads changed source updated in this PR, not weakened.WIP: test(docs): make the UTF-8 pipe fixture portable on Windowsto test(docs): make the UTF-8 pipe fixture portable on WindowsReviewed head
5a7d656a0336720e9c48aa51c5304812183fd4c8; no correctness issue found in the complete five-file diff.Independent native Windows 11 build 26300 / Python 3.14.7 validation, two interleaved control/PR pairs: the unchanged catalogue check fails 1 of 25 cases on both controls, while all 25 pass on both PR runs. The control was
5765a767on main7ff5256e; both catalogue source files are identical to the PR's named main9c9d69ed. The real catalogue renderer also accepts the branch's four new three-line run fragments.The explicit LF policy fixes platform newline translation in the authored stream. It retains the initial ASCII encoding, the arrow-containing source, production UTF-8 reconfiguration and exact UTF-8 byte assertion; it does not relax the encoding check or change production output. The frozen catalogue is untouched. This is approval of the small game-free fixture/docs change; no game-runtime or fresh full-suite run is claimed for this review.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.