mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-04 12:00:16 +00:00
some proper cleanup of pending_events
This commit is contained in:
parent
76cc37b867
commit
a8939e6051
@ -221,6 +221,7 @@ if __name__ == "__main__":
|
||||
originalStartTest = unittest.TextTestResult.startTest
|
||||
def startTest(self, test):
|
||||
originalStartTest(self, test)
|
||||
print()
|
||||
unittest.TextTestResult.startTest = startTest
|
||||
|
||||
testrunner = unittest.TextTestRunner(verbosity=2).run(testsuite)
|
||||
|
@ -53,7 +53,8 @@ class TestInjector(unittest.TestCase):
|
||||
self.injector.stop_injecting()
|
||||
self.injector = None
|
||||
evdev.InputDevice.grab = self.grab
|
||||
pending_events['device 2'] = []
|
||||
if pending_events.get('device 2') is not None:
|
||||
del pending_events['device 2']
|
||||
|
||||
def test_modify_capabilities(self):
|
||||
class FakeDevice:
|
||||
|
@ -36,6 +36,10 @@ CODE_3 = 102
|
||||
class TestReader(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
keycode_reader.clear()
|
||||
if pending_events.get('device 1') is not None:
|
||||
del pending_events['device 1']
|
||||
if pending_events.get('device 2') is not None:
|
||||
del pending_events['device 2']
|
||||
|
||||
def test_reading(self):
|
||||
keycode_reader.start_reading('device 1')
|
||||
|
Loading…
Reference in New Issue
Block a user