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

Method test_call

python/ee/tests/function_test.py:90–104  ·  view source on GitHub ↗

Verifies the full function invocation flow.

(self)

Source from the content-addressed store, hash-verified

88 ee.Function._registerPromoter(old_promoter)
89
90 def test_call(self):
91 """Verifies the full function invocation flow."""
92 old_promoter = ee.Function._promoter
93 ee.Function._registerPromoter(lambda obj, type_name: [type_name, obj])
94
95 return_type, return_value = TEST_FUNC.call(42, 13)
96 self.assertEqual('Image', return_type)
97 self.assertEqual(TEST_FUNC, return_value.func)
98 self.assertEqual({
99 'a': ['Image', 42],
100 'b': ['Image', 13]
101 }, return_value.args)
102
103 # Clean up.
104 ee.Function._registerPromoter(old_promoter)
105
106 def test_to_string(self):
107 """Verifies function docstring generation."""

Callers

nothing calls this directly

Calls 2

_registerPromoterMethod · 0.80
callMethod · 0.80

Tested by

no test coverage detected