Repository navigation
tests: don't assume the virtual screen starts at 0,0 on Windows - #613
Merged
BoboTiG merged 1 commit intoDec 1, 2026
Merged
Conversation
test_coordinates_capture expected sct-2x12_40x67.png, but CLI coordinates are relative to monitor 0, whose origin is negative when a monitor sits left of or above the primary one (e.g. left=-1366 gives sct-2x-1354_...). test_callback renamed mon0.png to an existing .old file, which raises FileExistsError on Windows; use Path.replace(). AI-assisted (Claude): drafted with AI, reviewed and run by the author.
Owner
|
Thanks @jeanluyac-sketch ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #612.
Two tests fail on Windows machines where a monitor sits left of (or above) the primary one, independently of any code change:
test_implementation.py::TestEntryPoint::test_coordinates_captureexpectssct-2x12_40x67.png, but CLI coordinates are relative to monitor 0 (the virtual screen), whose origin is negative there. With a monitor at left=-1366 the file issct-2x-1354_40x67.png. The expected name is now computed frommonitors[0].test_save.py::test_callbackrenamesmon0.pngtomon0.png.old; on WindowsPath.rename()raisesFileExistsErrorif the target exists. It now usesPath.replace().Tests added/updated: tests only, no runtime change
Documentation updated (or your review concluded: not needed)
Release notes added (or your review concluded: not needed)
./check.sh(or./check.ps1) passedTested on Windows 11 / Python 3.14 with four monitors (one at -1366,0): full suite 169 passed, 31 skipped, 0 failed (5 failed before this change). The affected tests also pass on Linux.
AI assistance disclosure