Skip to content

Commit 50abac4

Browse files
committed
fix uinput tests
1 parent 497f1a0 commit 50abac4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

tests/test_uinput.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,19 @@ def test_abs_values(c):
6161
c['events'] = {
6262
e.EV_KEY : [e.KEY_A, e.KEY_B],
6363
e.EV_ABS : [(e.ABS_X, (0, 255, 0, 0)),
64-
(e.ABS_Y, device.AbsInfo(0, 255, 5, 10))],
64+
(e.ABS_Y, device.AbsInfo(0, 255, 5, 10, 0, 0))],
6565
}
6666

6767
with uinput.UInput(**c) as ui:
6868
c = ui.capabilities()
69-
assert c[e.EV_ABS][0] == (0L, device.AbsInfo(min=0, max=255, fuzz=0, flat=0))
70-
assert c[e.EV_ABS][1] == (1L, device.AbsInfo(min=0, max=255, fuzz=5, flat=10))
69+
abs = device.AbsInfo(value=0, min=0, max=255, fuzz=0, flat=0, resolution=0)
70+
assert c[e.EV_ABS][0] == (0, abs)
71+
abs = device.AbsInfo(value=0, min=0, max=255, fuzz=5, flat=10, resolution=0)
72+
assert c[e.EV_ABS][1] == (1, abs)
7173

7274
c = ui.capabilities(verbose=True)
73-
assert c[('EV_ABS', 3)][0] == (('ABS_X', 0L), device.AbsInfo(min=0, max=255, fuzz=0, flat=0))
75+
abs = device.AbsInfo(value=0, min=0, max=255, fuzz=0, flat=0, resolution=0)
76+
assert c[('EV_ABS', 3)][0] == (('ABS_X', 0), abs)
7477

7578
c = ui.capabilities(verbose=False, absinfo=False)
7679
assert c[e.EV_ABS] == list((0, 1))

0 commit comments

Comments
 (0)