def test_tooManyArgumentsAndSpecificErrorMessage(self):
        """
        L{usage.flagFunction} uses the given method name in the error message
        raised when the method allows too many arguments.
        """
        exc = self.assertRaises(
            usage.UsageError,
            usage.flagFunction, self.SomeClass().manyArgs, "flubuduf")
        self.assertEqual("Invalid Option function for flubuduf", str(exc))

        L{usage.flagFunction} uses the given method name in the error message
        raised when the method allows too many arguments.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_usage.py