Ejemplo n.º 1
0
 def test_set_slot_value(self):
     l = Libevdev(self.fd)
     v = l.slot_value(l.current_slot, "ABS_MT_POSITION_X")
     v += 10
     v2 = l.slot_value(l.current_slot, "ABS_MT_POSITION_X", v)
     self.assertEqual(v, v2)
     v2 = l.slot_value(l.current_slot, "ABS_MT_POSITION_X")
     self.assertEqual(v, v2)
Ejemplo n.º 2
0
 def test_slot_value(self):
     l = Libevdev(self.fd)
     a = l.absinfo("ABS_MT_POSITION_X")
     v = l.slot_value(l.current_slot, "ABS_MT_POSITION_X")
     self.assertLessEqual(a["minimum"], v)
     self.assertGreaterEqual(a["maximum"], v)