Add regression test for duplicate on_scroll on Windows - #677
Open
mxschmitt wants to merge 1 commit into
Open
Conversation
Verifies that a single Controller.scroll() call results in a single on_scroll callback. Previously on Windows two events were delivered: one from NotifierMixin._emit and one from the WH_MOUSE_LL hook, since SendInput already reaches the hook.
mxschmitt
force-pushed
the
fixup/win32-remove-duplicate-emits-test
branch
from
May 12, 2026 23:42
1c0314f to
5c627ff
Compare
mxschmitt
changed the base branch from
fixup/win32-remove-duplicate-emits
to
master
May 12, 2026 23:42
Author
|
cc @moses-palmer a test for the recent bug which got fixed. |
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.
Summary
Adds a regression test for #672. Asserts that
Controller.scroll(0, 1)produces exactly oneon_scrollcallback within a 0.5s window — not two — and is intended to land alongside the fix on this branch.Verification
Run on Windows 11 (Python 3.13) against three pynput sources:
pynput==1.8.1(PyPI)AssertionError: 1 != 2 ... got 2: [(0, 1), (0, 1)]master(a871765)The test reuses existing test infrastructure (
self.listener,self.controller) and is platform-agnostic — it should also pass on macOS/Xorg where the bug never existed.