async def test_CurrentLoad(c, s, a, b): cl = CurrentLoad(s) futures = c.map(slowinc, range(10), delay=0.001) await wait(futures) cl.update() d = dict(cl.source.data) assert all(len(l) == 2 for l in d.values()) assert cl.cpu_figure.x_range.end == 200
def test_CurrentLoad(c, s, a, b): cl = CurrentLoad(s) futures = c.map(slowinc, range(10), delay=0.001) yield wait(futures) cl.update() d = dict(cl.source.data) assert all(len(L) == 2 for L in d.values()) assert all(d["nbytes"])