def test_polygon(self): ts_ds = get_time_series(self.cube, dict(type='Polygon', coordinates=[[[20.0, 10.0], [20.0, 20.0], [10.0, 20.0], [10.0, 10.0], [20.0, 10.0]]])) self.assert_dataset_ok(ts_ds, 100, True, False, False, True, False, False)
def test_no_vars(self): ts_ds = get_time_series(self.cube, dict(type='Polygon', coordinates=[[[20.0, 10.0], [20.0, 20.0], [10.0, 20.0], [10.0, 10.0], [20.0, 10.0]]]), var_names=[]) self.assertIsNone(ts_ds)
def test_polygon_incl_count(self): ts_ds = get_time_series(self.cube, dict(type='Polygon', coordinates=[[[20.0, 10.0], [20.0, 20.0], [10.0, 20.0], [10.0, 10.0], [20.0, 10.0]]]), include_count=True) self.assert_dataset_ok(ts_ds, 110, True, True, False, True, True, False)
def test_polygon_incl_stdev_var_subs(self): ts_ds = get_time_series(self.cube, dict(type='Polygon', coordinates=[[[20.0, 10.0], [20.0, 20.0], [10.0, 20.0], [10.0, 10.0], [20.0, 10.0]]]), var_names=['B'], include_stdev=True) self.assert_dataset_ok(ts_ds, 100, False, False, False, True, False, True)
def test_polygon_using_groupby(self): ts_ds = get_time_series(self.cube, dict(type='Polygon', coordinates=[[[20.0, 10.0], [20.0, 20.0], [10.0, 20.0], [10.0, 10.0], [20.0, 10.0]]]), include_count=True, include_stdev=True, use_groupby=True) self.assert_dataset_ok(ts_ds, 100, True, True, True, True, True, True)
def test_point(self): ts_ds = get_time_series(self.cube, dict(type='Point', coordinates=[20.0, 10.0])) self.assert_dataset_ok(ts_ds, 1, True, False, False, True, False, False)