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

Method test_inner_join

python/ee/tests/join_test.py:79–111  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 self.assertEqual(expect, result)
78
79 def test_inner_join(self):
80 first = '1st'
81 second = '2nd'
82 join = ee.Join.inner(first, second)
83 self.assertEqual({'value': 'fakeValue'}, join.getInfo())
84
85 join_func = ee.ApiFunction.lookup(INNER)
86 self.assertEqual(join_func, join.func)
87
88 self.assertFalse(join.isVariable())
89 args = join.args
90 self.assertEqual(first, args['primaryKey']._string)
91 self.assertEqual(second, args['secondaryKey']._string)
92
93 result = json.loads(join.serialize())
94 expect = {
95 'result': '0',
96 'values': {
97 '0': {
98 'functionInvocationValue': {
99 'arguments': {
100 'primaryKey': {'constantValue': '1st'},
101 'secondaryKey': {'constantValue': '2nd'},
102 },
103 'functionName': INNER,
104 }
105 }
106 },
107 }
108 self.assertEqual(expect, result)
109
110 join_cast_result = json.loads(ee.Join(join).serialize())
111 self.assertEqual(expect, join_cast_result)
112
113 def test_inner(self):
114 primary_key = 'a'

Callers

nothing calls this directly

Calls 5

innerMethod · 0.80
lookupMethod · 0.80
isVariableMethod · 0.80
getInfoMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected