示例#1
0
def test_symlinkat(tmpdir):
    tmpdir.join('file').write('text')
    dirfd = os.open(str(tmpdir), os.O_RDONLY)
    try:
        rposix.symlinkat('file', 'link', dir_fd=dirfd)
        assert os.readlink(str(tmpdir.join('link'))) == 'file'
    finally:
        os.close(dirfd)
示例#2
0
def test_symlinkat(tmpdir):
    tmpdir.join('file').write('text')
    dirfd = os.open(str(tmpdir), os.O_RDONLY)
    try:
        rposix.symlinkat('file', 'link', dir_fd=dirfd)
        assert os.readlink(str(tmpdir.join('link'))) == 'file'
    finally:
        os.close(dirfd)