mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-08 09:20:14 +01:00
test: simplify results handling in the python tests
No point appending the message header components to the results when we just ignore them later anyway.
This commit is contained in:
parent
8ea6b81f40
commit
2e1babbb84
1 changed files with 2 additions and 3 deletions
|
|
@ -207,8 +207,7 @@ class Interface:
|
|||
# logger.debug(f"unpacked {format} to {values}")
|
||||
|
||||
results = []
|
||||
results.append(values.pop(0)) # id
|
||||
results.append(values.pop(0)) # length | opcode
|
||||
values = values[2:] # drop id, length | opcode
|
||||
|
||||
# we had to insert the string length into the format, filter the
|
||||
# value for that out again.
|
||||
|
|
@ -225,7 +224,7 @@ class Interface:
|
|||
results.append(values.pop(0))
|
||||
|
||||
# First two values are object_id and len|opcode
|
||||
return (msglen, { name: value for name, value in zip(names, results[2:]) })
|
||||
return (msglen, { name: value for name, value in zip(names, results) })
|
||||
|
||||
def connect(self, event: str, callback: Callable):
|
||||
self.callbacks[event] = callback
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue