def test_decorate(self):
        """
        Test decorating a function.

        @raise AssertionError: If the test fails.
        """
        class SlowClass(object):

            @self.alert(1)
            def slow_function_true(self):
                time.sleep(2)
                return 'foo'

            @self.alert(1)
            def slow_function_false(self):
                return 'bar'

        slow_class = SlowClass()
        self.assertEquals(('foo', True), slow_class.slow_function_true())
        self.assertEquals(('bar', False), slow_class.slow_function_false())

        Test decorating a function.

        @raise AssertionError: If the test fails.
        
tests/structural_tests/test_decorator.py