Solaar/tests
grechmarlon e844d0611d Fix crash writing per-key lighting from the CLI
PerKeyLighting.write_key_value dereferenced self._value without the
initialization guard that the base Settings.write_key_value has. On a
fresh CLI invocation (solaar config <dev> per-key-lighting <key> <color>)
nothing has read the setting yet, so _value is still None and the write
crashes with 'NoneType' object does not support item assignment.
The GUI never hits this because it reads all settings on attach.

Initialize via read(), which for this write-only 0x8081 setting loads
the persisted map or fabricates the all-"No change" sentinel map.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 20:18:38 +02:00
..
hid_parser Introduce hid_parser tests 2024-09-15 09:19:13 -04:00
hidapi hidapi: Explicitly load hidapi/udev implementation 2024-10-11 07:42:38 -04:00
logitech_receiver Fix crash writing per-key lighting from the CLI 2026-06-11 20:18:38 +02:00
solaar tests: mock the libnotify backend so the suite raises no real notifications 2026-05-21 10:15:12 -04:00
test_keysyms keysyms: Introduce tests for this package 2024-10-11 07:42:38 -04:00
__init__.py tests: Introduce tests with pytest 2024-02-10 13:58:20 -05:00
conftest.py tests: mock the libnotify backend so the suite raises no real notifications 2026-05-21 10:15:12 -04:00