()
| 59 | |
| 60 | |
| 61 | def test_distributed_tqdm_iterator(): |
| 62 | mgr = tqdm_ray.instance() |
| 63 | mgr.bar_groups.clear() |
| 64 | |
| 65 | assert sum(tqdm_ray.tqdm(range(100), desc="baz", flush_interval_s=0)) == sum( |
| 66 | range(100) |
| 67 | ) |
| 68 | wait_for_condition(lambda: len(mgr.bar_groups) == 1) |
| 69 | assert len(mgr.bar_groups) == 1 |
| 70 | bar_group = list(mgr.bar_groups.values())[0] |
| 71 | assert len(bar_group.bars_by_uuid) == 1 |
| 72 | bar = list(bar_group.bars_by_uuid.values())[0] |
| 73 | assert bar.bar.n == 100, bar.bar.n |
| 74 | assert "baz" in bar.bar.desc, bar.bar.desc |
| 75 | |
| 76 | |
| 77 | def test_flush_interval(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…