def test_custom_function_wrapper(self): try: foo.function_that_takes_foo("yellow") except TypeError: self.fail() foo1 = foo.function_that_returns_foo() self.assertEqual(foo1.get_datum(), "yellow")
def test_implicit_conversion_function_value(self): zoo1 = foo.Zoo("zpto") try: foo.function_that_takes_foo(zoo1) except TypeError: self.fail() foo1 = foo.function_that_returns_foo() self.assertEqual(foo1.get_datum(), "zpto")
def test_custom_function_wrapper(self): try: foo.function_that_takes_foo("yellow") except TypeError: self.fail() foo1 = foo.function_that_returns_foo() self.assertEqual(foo1.get_datum(), "yellow") ## check that the wrapper gets a docstring self.assertEqual(foo.function_that_takes_foo.__doc__, "I'm awake you rascals!")