#NEWLINE# def _run_and_track( self , err_lines , returncode ) : #NEWLINE# #INDENT# with mock . patch ( 'luigi.contrib.hadoop.subprocess' ) as subprocess : #NEWLINE# #INDENT# subprocess . Popen . return_value = MockProcess ( err_lines , self ) #NEWLINE# ( _ , err ) = luigi . contrib . hadoop . run_and_track_hadoop_job ( [ ] , self . track ) #NEWLINE# self . assertEqual ( err , '' . join ( err_lines ) )