#NEWLINE# def test_should_return_completions_when_exit_code_is_zero( self ) : #NEWLINE# #INDENT# view = Mock ( ) #NEWLINE# view . file_name . return_value = '/any-directory/file' #NEWLINE# self . process . wait . return_value = 0 #NEWLINE# self . process . communicate . return_value = ( b'MATCH glob,80,7,/home/hein/git/rust/src/libglob/lib.rs,statement' , b'this\nis\nthe\nstderr' ) #NEWLINE# from RustAutoComplete import run_racer #NEWLINE# results = run_racer ( view , [ 'any' , 'racer' , 'commands' ] ) #NEWLINE# self . assertEqual ( len ( results ) , 1 ) #NEWLINE# single_result = results [ 0 ] #NEWLINE# self . assertEqual ( single_result . path , '/home/hein/git/rust/src/libglob/lib.rs' ) #NEWLINE# self . assertEqual ( single_result . column , 7 ) #NEWLINE# self . assertEqual ( single_result . row , 80 ) #NEWLINE# self . assertEqual ( single_result . completion , 'glob' ) #NEWLINE# self . assertEqual ( single_result . type , 'statement' )