More modifications to tests for math.sum: replace the Python