timer_test: use hub.switch() instead of hub.run()

run should never be called explicitly
This commit is contained in:
Denis Bilenko
2009-06-17 16:30:16 +07:00
parent e362ee514c
commit b30acf5b31

View File

@@ -56,7 +56,7 @@ class TestTimer(TestCase):
#t.schedule() #t.schedule()
api.get_hub().schedule_call_global(0, lambda: (called.append(True), hub.abort())) api.get_hub().schedule_call_global(0, lambda: (called.append(True), hub.abort()))
hub.default_sleep = lambda: 0.0 hub.default_sleep = lambda: 0.0
hub.run() hub.switch()
assert called assert called
assert not hub.running assert not hub.running