#NEWLINE# def test_strip_color_cli_valid_file( ) : #NEWLINE# #INDENT# fixtures_dir = os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , 'fixtures' ) ) #NEWLINE# input_file = os . path . join ( fixtures_dir , 'ls_output_colored.txt' ) #NEWLINE# ( stdout , stderr ) = subprocess . Popen ( ( 'python -m painter.strip_color_cli %s' % input_file ) , shell = True , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) . communicate ( ) #NEWLINE# with open ( os . path . join ( fixtures_dir , 'ls_output.txt' ) ) as f : #NEWLINE# #INDENT# text = f . read ( ) #NEWLINE# #UNINDENT# assert ( stdout == b ( text ) )