'Tests split_before_first_argument on a function definition.'

def testSplittingBeforeFirstArgumentOnFunctionDefinition(self):

    try:
        style.SetGlobalStyle(style.CreateStyleFromConfig('{based_on_style:    chromium,    split_before_first_argument:    True}'))
        unformatted_code = textwrap.dedent('                                        def    _GetNumberOfSecondsFromElements(year,    month,    day,    hours,\n                                                                                                                                                                                        minutes,    seconds,    microseconds):\n                                                return\n                                        ')
        expected_formatted_code = textwrap.dedent('                                        def    _GetNumberOfSecondsFromElements(\n                                                        year,    month,    day,    hours,    minutes,    seconds,    microseconds):\n                                                return\n                                        ')
        uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
        self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
    finally:
        style.SetGlobalStyle(style.CreateChromiumStyle())
