Skip to content

Commit 828318d

Browse files
author
Joseph Hamman
committed
test on dask array
1 parent 5da00a6 commit 828318d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

xbatcher/tests/test_generators.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,10 @@ def test_preload_batch_false(sample_ds_1d):
181181

182182

183183
def test_preload_batch_true(sample_ds_1d):
184-
bg = BatchGenerator(sample_ds_1d, input_dims={'x': 2}, preload_batch=True)
184+
sample_ds_1d_dask = sample_ds_1d.chunk({'x': 2})
185+
bg = BatchGenerator(
186+
sample_ds_1d_dask, input_dims={'x': 2}, preload_batch=True
187+
)
185188
assert bg.preload_batch is True
186189
for ds_batch in bg:
187190
assert isinstance(ds_batch, xr.Dataset)

0 commit comments

Comments
 (0)