def connect(): client = pipe.PipeClient() client.connect(TEST_PIPE) evergreen.sleep(0.1) # give it some time to stabilize client.close() self.assertRaises(pipe.PipeError, client.read_until, b'\n') self.server.close()
def connect(): client = tcp.TCPClient() client.connect(TEST_CLIENT) evergreen.sleep(0.1) # give it some time to stabilize client.close() self.assertRaises(tcp.TCPError, client.read_until, b'\n') self.server.close()
def func(): t = Timeout(0.01) t.start() try: evergreen.sleep(10) except Timeout as e: self.assertTrue(t is e)
def func(): evergreen.sleep(0.001) return 42
def func(): evergreen.sleep(0.01) d.count += 1 barrier.wait()
def run(x): evergreen.sleep(x)
def func3(): evergreen.sleep(0.1) t1.kill()
def func(): called.append(None) evergreen.sleep(0.001) called.append(None)
def func1(): evergreen.sleep(0.01)
def func1(): evergreen.sleep(0) evergreen.sleep(0)
def func1(): evergreen.sleep(10)
def func(x): called.append(x) evergreen.sleep(0) called.append(x)
def func(): evergreen.sleep(0) called.append(None) evergreen.sleep(0) called.append(None)
def func(): evergreen.sleep(0.01) self.assertRaises(RuntimeError, self.loop.destroy)
def sleep(): with Timeout(None): evergreen.sleep(0.01)
def func(x): evergreen.sleep(x) return 42
def sleep(): with Timeout(0.01, FooTimeout): evergreen.sleep(10)
def sleep(): with Timeout(-1): evergreen.sleep(0.01)
def sender(): ch.send('hello') evergreen.sleep(0) ch.send('world') evergreen.sleep(0) ch.send_exception(StopIteration)