def test_sort_levels_sorts_levels_according_to_size_larger_first(self):
     pyr = Pyramid(12, 3)
     level_0 = PyramidLevel(
         np.array([[10, 10, 10], [2, 2, 2], [4, 4, 4]], dtype=np.float64),
         2, 2)
     level_1 = PyramidLevel(np.array([[2, 2], [3, 3]], dtype=np.float64), 2,
                            2)
     level_2 = PyramidLevel(np.array([0], dtype=np.float64), 1, 1)
     pyr.add_lower_resolution_level(level_1)
     pyr.add_lower_resolution_level(level_0)
     pyr.add_lower_resolution_level(level_2)
     self.assertEqual(
         pyr.get_level(0).get_array().shape,
         level_1.get_array().shape)
     pyr.sort_levels()
     self.assertEqual(
         pyr.get_level(0).get_array().shape,
         level_0.get_array().shape)
 def test_get_level_returns_the_correct_list_element(self):
     pyr = Pyramid(10, 3)
     pyr.levels = [12, 13, 14]
     self.assertEqual(pyr.get_level(1), 13)
     self.assertEqual(pyr.get_level(0), 12)