def test_simple_sleep(self): if IS_TRAVIS: skip() start = time.time() sleep(0.02) delay = time.time() - start assert 0.02 - 0.004 <= delay < 0.02 + 0.02, delay
def test_simple(self): r_list = [] def f(): r_list.append(True) pid = spawn(f) assert isinstance(pid, ActorRef) assert pid.ref == 0 assert hasattr(pid.actor, 'mailbox') sleep(0.1) core.run() assert r_list == [True] assert pid.actor is None assert pid.is_alive is False
def f(): sleep() rlist.append('a')
def f(): sleep(0.2) rlist.append('a')
def _func(): func(*args, **kwargs) sleep(0.0)