def test_compose_threearg(self): append_exclamation_point = (functools.partial(func.flip(operator.add), "!")) make_hello = func.compose(str, self.add_to_hello, append_exclamation_point) self.assertEqual(make_hello(1), "Hello, 1!")
def test_compose_twoarg(self): hellocat = func.compose(str, self.add_to_hello) self.assertEqual(hellocat(1), "Hello, 1")