timer_test: use hub.switch() instead of hub.run()
run should never be called explicitly
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user