def test_validate_points_should_return_points_if_no_exceptions(self):
     points = [[1, 2, 3], [4, 5, 6]]
     self.assertEqual(points, EarthMatrix._validate_points(points))
 def test_validate_point_should_raise_if_lists_have_not_same_length(self):
     with self.assertRaises(EarthMatrixException) as context:
         EarthMatrix._validate_points([[1, 2, 3], [4, 5, 6], [7, 8]])
     self.assertEqual("'points' lists must have same length",
                      context.exception.message)
 def test_validate_points_should_raise_if_points_are_empty_list(self):
     with self.assertRaises(EarthMatrixException) as context:
         EarthMatrix._validate_points([])
     self.assertEqual("'points' must be a non empty list",
                      context.exception.message)
 def test_validate_points_should_raise_if_points_are_not_list_of_lists(
         self):
     with self.assertRaises(EarthMatrixException) as context:
         EarthMatrix._validate_points([[1, 2, 3], [4, 5, 6], (7, 8, 9)])
     self.assertEqual("'points' must be a list of lists",
                      context.exception.message)
 def test_validate_points_should_raise_if_points_are_not_list(self):
     with self.assertRaises(EarthMatrixException) as context:
         EarthMatrix._validate_points(None)
     self.assertEqual("'points' must be a list of lists",
                      context.exception.message)