MCPcopy
hub / github.com/google/earthengine-api / test_get

Method test_get

python/ee/tests/ee_list_test.py:239–253  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

237 self.assertEqual(expect, result)
238
239 def test_get(self):
240 expect = make_expression_graph({
241 'arguments': {
242 'list': {'constantValue': [1]},
243 'index': {'constantValue': 2},
244 },
245 'functionName': 'List.get',
246 })
247 expression = ee.List([1]).get(2)
248 result = json.loads(expression.serialize())
249 self.assertEqual(expect, result)
250
251 expression = ee.List([1]).get(index=2)
252 result = json.loads(expression.serialize())
253 self.assertEqual(expect, result)
254
255 def test_getArray(self):
256 expect = make_expression_graph({

Callers

nothing calls this directly

Calls 3

make_expression_graphFunction · 0.70
getMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected