def test_callsFunction(self):
        """
        L{_collectWarnings} returns the result of calling the callable passed to
        it with the parameters given.
        """
        arguments = []
        value = object()

        def f(*args, **kwargs):
            arguments.append((args, kwargs))
            return value

        result = _collectWarnings(lambda x: None, f, 1, 'a', b=2, c='d')
        self.assertEqual(arguments, [((1, 'a'), {'b': 2, 'c': 'd'})])
        self.assertIdentical(result, value)

        L{_collectWarnings} returns the result of calling the callable passed to
        it with the parameters given.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_warning.py