#NEWLINE# def testRaisesIfDestIsASymlinkToSrc( self ) : #NEWLINE# #INDENT# src_file = '/tmp/foo' #NEWLINE# dst_file = '/tmp/bar' #NEWLINE# contents = 'contents of file' #NEWLINE# self . filesystem . CreateFile ( src_file , contents = contents ) #NEWLINE# self . filesystem . CreateLink ( src_file , src_file ) #NEWLINE# self . assertTrue ( self . filesystem . Exists ( src_file ) ) #NEWLINE# self . assertRaises ( self . shutil . Error , self . shutil . copyfile , src_file , dst_file )