Skip to content

Commit 223bb6b

Browse files
committed
more asserts
1 parent 24b9fb5 commit 223bb6b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

tests/test_levels.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Copyright © 2024 Norman Fomferra and contributors
22
# Permissions are hereby granted under the terms of the MIT License:
33
# https://opensource.org/licenses/MIT.
4+
45
import json
56
import unittest
67

8+
import xarray as xr
79

810
from zappend.fsutil import FileObj
911
from zappend.levels import write_levels
@@ -68,6 +70,14 @@ def test_it(self):
6870
levels_info,
6971
)
7072

71-
# ds = xr.open_zarr(target_dir.uri + "/0.zarr")
72-
# self.assertEqual({"time": 1, "y": 10, "x": 20}, ds.sizes)
73-
# self.assertEqual({"x", "y", "time", "chl", "tsm"}, set(ds.variables))
73+
ds0 = xr.open_zarr(target_dir.uri + f"/0.zarr")
74+
self.assertEqual({"time": 3, "y": 1024, "x": 2048}, ds0.sizes)
75+
76+
ds1 = xr.open_zarr(target_dir.uri + f"/1.zarr")
77+
self.assertEqual({"time": 3, "y": 512, "x": 1024}, ds1.sizes)
78+
79+
ds2 = xr.open_zarr(target_dir.uri + f"/2.zarr")
80+
self.assertEqual({"time": 3, "y": 256, "x": 512}, ds2.sizes)
81+
82+
ds3 = xr.open_zarr(target_dir.uri + f"/3.zarr")
83+
self.assertEqual({"time": 3, "y": 128, "x": 256}, ds3.sizes)

0 commit comments

Comments
 (0)