def test_get_timeout():
pool = WorkerPool()
def f():
py.std.time.sleep(0.2)
return 42
-> reply = pool.dispatch(f)
py.test.raises(IOError, "reply.get(timeout=0.01)")