#NEWLINE# def test_detached( self ) : #NEWLINE# #INDENT# self . _add_and_commit ( 'foo' ) #NEWLINE# commit_hash = self . _get_commit_hash ( ) #NEWLINE# self . _add_and_commit ( 'bar' ) #NEWLINE# sh . git ( 'checkout' , 'HEAD^' ) #NEWLINE# git . add_git_segment ( self . powerline ) #NEWLINE# self . assertIn ( self . powerline . append . call_args [ 0 ] [ 0 ] . split ( ) [ 1 ] , commit_hash )