Example #1
0
    def test_ClobberFile(self):
        linkName = os.path.join(self.tempdir, 'link')
        with open(linkName, 'w') as f:
            f.write('foo')

        symlink.Force(self.source.name, linkName)
        self.verifySymlink(linkName)
Example #2
0
    def test_NoClobberDir(self):
        linkName = os.path.join(self.tempdir, 'link')
        os.mkdir(linkName, 0777)

        try:
            symlink.Force(self.source.name, linkName)
        except symlink.LinkError:
            pass
Example #3
0
    def test_ClobberSymlink(self):
        linkName = os.path.join(self.tempdir, 'link')
        os.symlink('nowhere', linkName)

        symlink.Force(self.source.name, linkName)
        self.verifySymlink(linkName)