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

Method test_get

python/ee/tests/ee_date_test.py:201–216  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

199 self.assertEqual(expect, result)
200
201 def test_get(self):
202 expect = make_expression_graph({
203 'arguments': {
204 'date': date_function_expr(1),
205 'unit': {'constantValue': DAY},
206 'timeZone': {'constantValue': UTC},
207 },
208 'functionName': 'Date.get',
209 })
210 expression = ee.Date(1).get(DAY, UTC)
211 result = json.loads(expression.serialize())
212 self.assertEqual(expect, result)
213
214 expression = ee.Date(1).get(unit=DAY, timeZone=UTC)
215 result = json.loads(expression.serialize())
216 self.assertEqual(expect, result)
217
218 def test_get_fraction(self):
219 expect = make_expression_graph({

Callers

nothing calls this directly

Calls 4

date_function_exprFunction · 0.85
make_expression_graphFunction · 0.70
getMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected