Example #1
0
def test_ensure_target_root_is_cwd(path):
    path.return_value = path
    path.absolute.return_value = path
    path.is_dir.side_effect = [True]

    local = Local(".")
    path.assert_called_once()

    local.ensure_target_root()
Example #2
0
def test_ensure_target_root(path):
    path.return_value = path
    path.absolute.return_value = path
    path.is_dir.side_effect = [True]

    local = Local("usr")
    path.assert_called_once()

    with pytest.raises(errors.Abort):
        local.ensure_target_root()