#NEWLINE# def testEchoInputWithStyle( self ) : #NEWLINE# #INDENT# code = 'def f(a = 1):\n    return 2*a\n' #NEWLINE# chromium_code = 'def f(a=1):\n  return 2 * a\n' #NEWLINE# with patched_input ( code ) : #NEWLINE# #INDENT# with captured_output ( ) as ( out , err ) : #NEWLINE# #INDENT# ret = yapf . main ( [ '-' , '--style=chromium' ] ) #NEWLINE# self . assertEqual ( ret , 2 ) #NEWLINE# self . assertEqual ( out . getvalue ( ) , chromium_code )