コード例 #1
0
def test_backoff_unlink_doesnt_exist():
    from conda.gateways.disk.delete import backoff_rmdir
    with tempdir() as td:
        test_path = join(td, 'test_path')
        touch(test_path)
        try:
            backoff_rmdir(join(test_path, 'some', 'path', 'in', 'utopia'))
        except Exception as e:
            assert e.value.errno == ENOENT
コード例 #2
0
def test_backoff_unlink():
    from conda.gateways.disk.delete import backoff_rmdir
    with tempdir() as td:
        test_path = join(td, 'test_path')
        touch(test_path)
        _try_open(test_path)
        assert isdir(td)
        backoff_rmdir(td)
        assert not isdir(td)