Commit 2423001
committed
test(hooks): pin _connected_device on MacOSThumbButtonTests for TomBadash#185 integration
``MacOSThumbButtonTests._make_hook`` previously left
``hook._connected_device`` unset. The thumb-button dispatch path runs
unconditionally on this branch, so the test passes; but TomBadash#185 adds an
early-return at the top of the CGEventTap callback gated on
``_should_intercept_events`` (which is ``self._connected_device is not
None``), and once both PRs are integrated that gate fires before
``btn=6`` reaches the thumb-button handler and the assertions about
``THUMB_BUTTON_DOWN`` / ``THUMB_BUTTON_UP`` / ``XBUTTON1_DOWN`` start
failing.
Pin a stub ``SimpleNamespace`` device on the hook in ``_make_hook``.
This is also semantically more truthful: btn=6 / btn=3 only originate
from a connected MX Master mouse in production, so the test should
model that state rather than the "no Logitech bound" cold-start state
the dispatch path was never designed for.
No-op against current master (the early-return does not yet exist);
becomes load-bearing as soon as TomBadash#185 lands.1 parent eefea69 commit 2423001
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
912 | 926 | | |
913 | 927 | | |
914 | 928 | | |
| |||
0 commit comments