From d020b3499bb83984b212bc87e646469768c6119e Mon Sep 17 00:00:00 2001 From: enkore Date: Tue, 5 Jan 2016 13:44:35 +0100 Subject: [PATCH] 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. --- tests/test_module_clicks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_module_clicks.py b/tests/test_module_clicks.py index 458fa80..c02be2d 100644 --- a/tests/test_module_clicks.py +++ b/tests/test_module_clicks.py @@ -81,8 +81,11 @@ def test_clicks(events, expected): _action = 'no action' + # Divide all times by 10 to make the test run faster + TestClicks.multi_click_timeout /= 10 + m = TestClicks() for sl, ev in events: m.on_click(ev) - time.sleep(sl) + time.sleep(sl / 10) assert m._action == expected