Skip to content

Commit

Permalink
test on dask array
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Hamman committed Nov 18, 2021
1 parent 5da00a6 commit 828318d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xbatcher/tests/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ def test_preload_batch_false(sample_ds_1d):


def test_preload_batch_true(sample_ds_1d):
bg = BatchGenerator(sample_ds_1d, input_dims={'x': 2}, preload_batch=True)
sample_ds_1d_dask = sample_ds_1d.chunk({'x': 2})
bg = BatchGenerator(
sample_ds_1d_dask, input_dims={'x': 2}, preload_batch=True
)
assert bg.preload_batch is True
for ds_batch in bg:
assert isinstance(ds_batch, xr.Dataset)
Expand Down

0 comments on commit 828318d

Please sign in to comment.