def test_list_of_pos(self): x = [1, 1, 1] self.assertEqual( replace_list_elements(x=x, testfunction=less_than_or_equal_to_zero, value=10), x)
def test_list_of_neg(self): x = [-1, -1, -1] self.assertEqual( replace_list_elements(x=x, testfunction=less_than_or_equal_to_zero, value=10), [10, 10, 10])