#NEWLINE# def test_exec_vint_with_stat_flag( self ) : #NEWLINE# #INDENT# invalid_file = str ( Path ( 'test' , 'fixture' , 'cli' , 'invalid1.vim' ) ) #NEWLINE# cmd = [ 'vint' , '--stat' , invalid_file ] #NEWLINE# with self . assertRaises ( subprocess . CalledProcessError ) as context_manager : #NEWLINE# #INDENT# subprocess . check_output ( cmd , stderr = subprocess . STDOUT , universal_newlines = True ) #NEWLINE# #UNINDENT# got_output = context_manager . exception . output #NEWLINE# expected_output_pattern = '{file_path}:1:13:' . format ( file_path = invalid_file ) #NEWLINE# expected_stat_pattern = 'Total' #NEWLINE# self . assertRegex ( got_output , expected_output_pattern ) #NEWLINE# self . assertRegex ( got_output , expected_stat_pattern )