#NEWLINE# def test_stash_unstaged_no_initial( self ) : #NEWLINE# #INDENT# 'Test commit_hook._stash_unstaged handles no initial commit' #NEWLINE# a = self . write_file ( 'a' , 'style error!' ) #NEWLINE# self . cmd ( ( 'git add ' + self ) ) #NEWLINE# self . write_file ( 'a' , 'much better :)' ) #NEWLINE# with commit_hook . _stash_unstaged ( ) : #NEWLINE# #INDENT# with open ( a ) as f : #NEWLINE# #INDENT# self . assertEquals ( f . read ( ) , 'much better :)' ) #NEWLINE# #UNINDENT# #UNINDENT# with open ( a ) as f : #NEWLINE# #INDENT# self . assertEquals ( f . read ( ) , 'much better :)' )