From 5e73e8e6e4f9a5c0d00636c94f08189b92091292 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Sun, 24 May 2009 19:44:16 +0700 Subject: [PATCH] timer_test.py: instead of using add_timer, use schedule_call_global, it is available in all hubs --- greentest/timer_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/greentest/timer_test.py b/greentest/timer_test.py index 6da7275..ecebe2a 100644 --- a/greentest/timer_test.py +++ b/greentest/timer_test.py @@ -56,8 +56,9 @@ class TestTimer(tests.TestCase): hub.abort() api.sleep(0) called = [] - t = timer.Timer(0, lambda: (called.append(True), hub.abort())) - t.schedule() + #t = timer.Timer(0, lambda: (called.append(True), hub.abort())) + #t.schedule() + api.get_hub().schedule_call_global(0, lambda: (called.append(True), hub.abort())) hub.default_sleep = lambda: 0.0 hub.run() assert called