def test_get_mirror_path_ko(tmp_path):
    """Test get_mirror_path failures."""
    msg = (
        f"the current working directory {Path.cwd()} shall be a parent directory of "
        f"the inputs directory {tmp_path}")
    with pytest.raises(ValueError, match=msg):
        get_mirror_path(tmp_path, "")
def test_get_mirror_path_ok(_tmp_path):
    """Test get_mirror_path."""
    path_from = _tmp_path / "c/d/e"
    path_from.mkdir(parents=True)
    assert get_mirror_path(path_from,
                           _tmp_path / "x/y") == _tmp_path / "x/y/d/e"
    assert get_mirror_path(path_from, Path("/x/y")) == Path("/x/y/d/e")

    # with common parents
    path_from = _tmp_path / "a/b/c/d/e"
    path_from.mkdir(parents=True)
    assert (get_mirror_path(path_from, _tmp_path / "a/b/x/y") == _tmp_path /
            "a/b/x/y/d/e")