def test_bars(locations):
"""Test with multiple bars.
Input: locations - a list of location (x, y) tuples
"""
writers = [Writer(loc) for loc in locations]
pbars = [ProgressBar(fd=writer) for writer in writers]
for pbar in pbars:
pbar.start()
for i in range(100):
time.sleep(0.01)
for pbar in pbars:
pbar.update(i)
for pbar in pbars:
pbar.finish()
评论列表
文章目录