def test_sum_values2(): """ Test sum_values() part 2 - ids [12, 11, 8] """ # description of test description = "Test sum_values() : part 2 - test calculating sums (row wise, column wise, and total) for a list of lists using ids = [12, 11, 8]" # expected values to test with actual values expected = {} expected["row_wise"] = np.array([ 5., 10., 5., 10., -3.]) expected["column_wise"] = np.array([ 7., 15., 5.]) expected["total"] = 27.0 # actual values actual = wateruse.sum_values(values = fixture["ids_12_11_8_values"]) # assert equality _perform_assertion(actual, expected, description = description)
def test_sum_values1(): """ Test sum_values() part 1 - ids [256, 241, 222, 220] """ # description of test description = "Test sum_values() : part 1 - test calculating sums (row wise, column wise, and total) for a list of lists using ids = [256, 241, 222, 220]" # expected values to test with actual values expected = {} expected["row_wise"] = np.array([ 15., 20., 15., 20., -20.]) expected["column_wise"] = np.array([ 12., 10., 14., 14.]) expected["total"] = 50.0 # actual values actual = wateruse.sum_values(values = fixture["ids_256_241_222_220_values"]) # assert equality _perform_assertion(actual, expected, description = description)