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

Method test_get_array

python/ee/tests/dictionary_test.py:129–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 self.assertEqual(expect, result)
128
129 def test_get_array(self):
130 expect = make_expression_graph({
131 'arguments': {
132 'dictionary': {'constantValue': {'a': 1}},
133 'key': {'constantValue': 'b'},
134 },
135 'functionName': 'Dictionary.getArray',
136 })
137 expression = ee.Dictionary({'a': 1}).getArray('b')
138 result = json.loads(expression.serialize())
139 self.assertEqual(expect, result)
140
141 expression = ee.Dictionary({'a': 1}).getArray(key='b')
142 result = json.loads(expression.serialize())
143 self.assertEqual(expect, result)
144
145 def test_get_geometry(self):
146 expect = make_expression_graph({

Callers

nothing calls this directly

Calls 3

make_expression_graphFunction · 0.70
getArrayMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected