def test_ma(self): data = COUNT.aggregate(self.cube.data, axis=0, function=self.func) self.assertArrayEqual(data, [2])
def test_not_callable(self): with self.assertRaisesRegex(TypeError, 'function must be a callable'): COUNT.aggregate(self.cube.data, axis=0, function='wibble')
def test_not_callable(self): with self.assertRaisesRegexp(TypeError, 'function must be a callable'): COUNT.aggregate(self.cube.data, axis=0, function='wibble')