diff --git a/bin/loop_effects/test_effects.py b/bin/loop_effects/test_effects.py index f1e98449..6ee8f18b 100644 --- a/bin/loop_effects/test_effects.py +++ b/bin/loop_effects/test_effects.py @@ -152,8 +152,9 @@ class Timer(unittest.TestCase): def test_a_timer_stopped_before_its_delay_has_passed_never_runs_the_action(self): ran = threading.Event() + # stop returns once the timer's thread has ended, so the action cannot run later. start_timer(0.2, ran.set)() - self.assertFalse(ran.wait(0.5)) + self.assertFalse(ran.is_set()) def test_stopping_a_timer_whose_action_runs_waits_for_the_action_to_end(self): started, ended = threading.Event(), threading.Event()