Speed up execution of test_module_clicks

Ideally we'd monkey patch Timer et al so that no dependence on the
host clock exists, which sooner or later might lead to false failures or
positives.
This commit is contained in:
enkore 2016-01-05 13:44:35 +01:00
parent 33c4ae2d9f
commit d020b3499b

View File

@ -81,8 +81,11 @@ def test_clicks(events, expected):
_action = 'no action' _action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks() m = TestClicks()
for sl, ev in events: for sl, ev in events:
m.on_click(ev) m.on_click(ev)
time.sleep(sl) time.sleep(sl / 10)
assert m._action == expected assert m._action == expected