(a, b)
| 126 | ], |
| 127 | ) |
| 128 | def test_assert_eq_scheduler(a, b): |
| 129 | counter = 0 # Counts how many times `custom_scheduler` is executed. |
| 130 | |
| 131 | def custom_scheduler(*args, **kwargs): |
| 132 | nonlocal counter |
| 133 | counter += 1 |
| 134 | return get_sync(*args, **kwargs) |
| 135 | |
| 136 | assert_eq(a, b) |
| 137 | assert counter == 0 |
| 138 | |
| 139 | assert_eq(a, b, scheduler=custom_scheduler) |
| 140 | # `custom_scheduler` should be executed 2x the number of arrays. |
| 141 | # Once in `persist` and once in `compute` |
| 142 | n_da_arrays = len([x for x in [a, b] if isinstance(x, Array)]) * 2 |
| 143 | assert counter == n_da_arrays |
nothing calls this directly
no test coverage detected