#NEWLINE# def testRaisesIfDestDirIsNotWritable( self ) : #NEWLINE# #INDENT# src_file = 'xyzzy' #NEWLINE# dst_dir = '/tmp/foo' #NEWLINE# dst_file = ( '%s/%s' % ( dst_dir , src_file ) ) #NEWLINE# src_contents = 'contents of source file' #NEWLINE# self . filesystem . CreateFile ( src_file , contents = src_contents ) #NEWLINE# self . filesystem . CreateDirectory ( dst_dir , perm_bits = 365 ) #NEWLINE# self . assertTrue ( self . filesystem . Exists ( src_file ) ) #NEWLINE# self . assertTrue ( self . filesystem . Exists ( dst_dir ) ) #NEWLINE# self . assertRaises ( IOError , self . shutil . copyfile , src_file , dst_file )