(self)
| 175 | self.assertEqual(expect, result) |
| 176 | |
| 177 | def test_accum(self): |
| 178 | expect = make_expression_graph({ |
| 179 | 'arguments': { |
| 180 | 'array': ARRAY_ONE, |
| 181 | 'axis': {'constantValue': 2}, |
| 182 | 'reducer': { |
| 183 | 'functionInvocationValue': { |
| 184 | 'functionName': 'Reducer.sum', |
| 185 | 'arguments': {}, |
| 186 | } |
| 187 | }, |
| 188 | }, |
| 189 | 'functionName': 'Array.accum', |
| 190 | }) |
| 191 | expression = ee.Array([1]).accum(2, ee.Reducer.sum()) |
| 192 | result = json.loads(expression.serialize()) |
| 193 | self.assertEqual(expect, result) |
| 194 | |
| 195 | expression = ee.Array([1]).accum(axis=2, reducer=ee.Reducer.sum()) |
| 196 | result = json.loads(expression.serialize()) |
| 197 | self.assertEqual(expect, result) |
| 198 | |
| 199 | def test_acos(self): |
| 200 | expect = make_expression_graph({ |
nothing calls this directly
no test coverage detected