Ejemplo n.º 1
0
 def test_is_minimum_should_return_false_if_altitude_is_greaterthan_any_neighbors(
         self):
     with mock.patch('earthmatrix.EarthMatrix._get_neighbors',
                     side_effect=([
                         EarthPoint(0, 0, 1),
                         EarthPoint(0, 1, 0),
                         EarthPoint(0, 2, 1)
                     ], )):
         pmap = EarthMatrix([[]])
         self.assertFalse(pmap._is_minimum(EarthPoint(0, 0, 1)))
Ejemplo n.º 2
0
 def test_is_minimum_should_return_true_if_altitude_is_lessequal_to_neighborss(
         self):
     with mock.patch('earthmatrix.EarthMatrix._get_neighbors',
                     side_effect=([
                         EarthPoint(0, 0, 1),
                         EarthPoint(0, 1, 2),
                         EarthPoint(0, 2, 3)
                     ], )):
         pmap = EarthMatrix([[]])
         self.assertTrue(pmap._is_minimum(EarthPoint(0, 0, 1)))