timer_test.py: instead of using add_timer, use schedule_call_global, it is available in all hubs

This commit is contained in:
Denis Bilenko
2009-05-24 19:44:16 +07:00
parent 89acad7c6a
commit 5e73e8e6e4

View File

@@ -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