def test_realpath_file(self):
tmpdir = self.tmpdir
linkpath = tmpdir.join('test')
filepath = tmpdir.join('file')
filepath.write("")
-> linkpath.mksymlinkto(filepath)
realpath = linkpath.realpath()
assert realpath.basename == 'file'