Skip to content
Snippets Groups Projects
Verified Commit 9452bb28 authored by Filipe Laíns's avatar Filipe Laíns
Browse files

tests: test enable() with 3 arguments in test_enable_event_code

parent 2cafc6d3
No related branches found
No related tags found
1 merge request!14Add more tests and fix event_to_value
...@@ -477,6 +477,13 @@ class TestAbsDevice(unittest.TestCase): ...@@ -477,6 +477,13 @@ class TestAbsDevice(unittest.TestCase):
dev.disable("EV_ABS", "ABS_RY") dev.disable("EV_ABS", "ABS_RY")
self.assertFalse(dev.has_event("EV_ABS", "ABS_RY")) self.assertFalse(dev.has_event("EV_ABS", "ABS_RY"))
data = 1
self.assertFalse(dev.has_event("EV_REP", "REP_DELAY"))
dev.enable("EV_REP", "REP_DELAY", data)
self.assertTrue(dev.has_event("EV_REP", "REP_DELAY"))
dev.disable("EV_REP", "REP_DELAY")
self.assertFalse(dev.has_event("EV_REP", "REP_DELAY"))
@unittest.skipUnless(is_root(), 'Test requires root') @unittest.skipUnless(is_root(), 'Test requires root')
def test_enable_property(self): def test_enable_property(self):
dev = Libevdev(self.fd) dev = Libevdev(self.fd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment