Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
bouweandela committed Apr 17, 2024
1 parent 0d1fc27 commit 27ecc8f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from unittest import mock

from dask.array import Array as dask_array
import dask.array as da
import numpy as np

from iris._lazy_data import _optimum_chunksize
Expand Down Expand Up @@ -50,7 +50,8 @@ def test_cf_data_type(self):
chunks = [1, 12, 100]
cf_var = self._make(chunks)
lazy_data = _get_cf_var_data(cf_var, self.filename)
self.assertIsInstance(lazy_data, dask_array)
self.assertIsInstance(lazy_data, da.Array)
self.assertIsInstance(da.utils.meta_from_array(lazy_data), np.ma.MaskedArray)

def test_cf_data_chunks(self):
chunks = [2500, 240, 200]
Expand Down Expand Up @@ -90,7 +91,7 @@ def test_cf_data_contiguous(self):
def test_type__1kf8_is_lazy(self):
cf_var = self._make(shape=(1000,), dtype="f8")
var_data = _get_cf_var_data(cf_var, self.filename)
self.assertIsInstance(var_data, dask_array)
self.assertIsInstance(var_data, da.Array)

def test_arraytype__1ki2_is_real(self):
cf_var = self._make(shape=(1000,), dtype="i2")
Expand Down

0 comments on commit 27ecc8f

Please sign in to comment.