#NEWLINE# def testSucceedsIfDestExistsAndIsWritable( self ) : #NEWLINE# #INDENT# src_file = 'xyzzy' #NEWLINE# dst_file = 'xyzzy_copy' #NEWLINE# src_contents = 'contents of source file' #NEWLINE# dst_contents = 'contents of dest file' #NEWLINE# self . filesystem . CreateFile ( src_file , contents = src_contents ) #NEWLINE# self . filesystem . CreateFile ( dst_file , contents = dst_file ) #NEWLINE# self . assertTrue ( self . filesystem . Exists ( src_file ) ) #NEWLINE# self . assertTrue ( self . filesystem . Exists ( dst_file ) ) #NEWLINE# self . shutil . copyfile ( src_file , dst_file ) #NEWLINE# self . assertTrue ( self . filesystem . Exists ( dst_file ) ) #NEWLINE# self . assertEqual ( src_contents , self . filesystem . GetObject ( dst_file ) . contents )