(self)
| 81 | ee.Kernel(1234) # pytype:disable=wrong-arg-types |
| 82 | |
| 83 | def test_add(self): |
| 84 | kernel1 = ee.Kernel.kirsch(1.1, True) |
| 85 | kernel2 = ee.Kernel.prewitt(2.2, False) |
| 86 | normalize = True |
| 87 | expect = make_expression_graph({ |
| 88 | 'arguments': { |
| 89 | 'kernel1': { |
| 90 | 'functionInvocationValue': { |
| 91 | 'functionName': 'Kernel.kirsch', |
| 92 | 'arguments': { |
| 93 | 'magnitude': {'constantValue': 1.1}, |
| 94 | 'normalize': {'constantValue': True}, |
| 95 | }, |
| 96 | } |
| 97 | }, |
| 98 | 'kernel2': { |
| 99 | 'functionInvocationValue': { |
| 100 | 'functionName': 'Kernel.prewitt', |
| 101 | 'arguments': { |
| 102 | 'magnitude': {'constantValue': 2.2}, |
| 103 | 'normalize': {'constantValue': False}, |
| 104 | }, |
| 105 | } |
| 106 | }, |
| 107 | 'normalize': {'constantValue': normalize}, |
| 108 | }, |
| 109 | 'functionName': 'Kernel.add', |
| 110 | }) |
| 111 | expression = kernel1.add(kernel2, normalize) |
| 112 | result = json.loads(expression.serialize()) |
| 113 | self.assertEqual(expect, result) |
| 114 | |
| 115 | expression = kernel1.add(kernel2=kernel2, normalize=normalize) |
| 116 | result = json.loads(expression.serialize()) |
| 117 | self.assertEqual(expect, result) |
| 118 | |
| 119 | def test_chebyshev(self): |
| 120 | radius = 1.1 |
nothing calls this directly
no test coverage detected