def test_symlink_remove(self):
-> tmpdir = self.tmpdir.realpath()
linkpath = tmpdir.join('test')
linkpath.mksymlinkto(linkpath) # point to itself
assert linkpath.check(link=1)
linkpath.remove()
assert not linkpath.check()