We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 669970c + 1a22c49 commit 3f2a2f0Copy full SHA for 3f2a2f0
cubed_xarray/tests/test_wrapping.py
@@ -0,0 +1,22 @@
1
+import xarray as xr
2
+from xarray.core.parallelcompat import list_chunkmanagers
3
+import cubed
4
+
5
+from cubed_xarray.cubedmanager import CubedManager
6
7
8
+class TestDiscoverCubedManager:
9
+ def test_list_cubedmanager(self):
10
+ chunkmanagers = list_chunkmanagers()
11
+ assert 'cubed' in chunkmanagers
12
+ assert isinstance(chunkmanagers['cubed'], CubedManager)
13
14
+ def test_chunk(self):
15
+ da = xr.DataArray([1, 2], dims='x')
16
+ chunked = da.chunk(x=1, chunked_array_type='cubed')
17
+ assert isinstance(chunked.data, cubed.Array)
18
+ assert chunked.chunksizes == {'x': (1, 1)}
19
20
+ # TODO test cubed is default when dask not installed
21
22
+ # TODO test dask is default over cubed when both installed
0 commit comments