def test_from_dataset_04_exact_selection(self):
"""Test the from_dataset creation method with selected names"""
variables, coords = self._from_dataset_test_variables
ds = xr.Dataset(variables, coords)
l = self.list_class.from_dataset(ds, ydim=2, method=None,
name=['v0', 'v2'])
self.assertEqual(len(l), 2)
self.assertEqual(set(l.names), {'v0', 'v2'})
for arr in l:
self.assertEqual(arr.ydim, 2,
msg="Wrong ydim slice for " + arr.name)
评论列表
文章目录