mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
tests: fix data parse for hidpp index
Signed-off-by: Filipe Laíns <lains@archlinux.org>
This commit is contained in:
committed by
Benjamin Tissoires
parent
b3f2406180
commit
3105428ba1
@@ -138,9 +138,8 @@ def check_section_hidpp10(section):
|
||||
pass
|
||||
|
||||
try:
|
||||
index = int(section['DeviceIndex'])
|
||||
# 10 is arbitrarily chosen
|
||||
assert(index > 0 and index < 10)
|
||||
index = int(section['DeviceIndex'], 16)
|
||||
assert(index > 0 and index <= 0xff)
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
@@ -175,9 +174,8 @@ def check_section_hidpp20(section):
|
||||
assertIn(key, permitted)
|
||||
|
||||
try:
|
||||
index = int(section['DeviceIndex'])
|
||||
# 10 is arbitrarily chosen
|
||||
assert(index > 0 and index < 10)
|
||||
index = int(section['DeviceIndex'], 16)
|
||||
assert(index > 0 and index <= 0xff)
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user