def METHOD_NAME(
    file_uri: str,
    path_class: Type[PurePath],
    expected_result: Union[PurePath, Type[Exception]],
) -> None:
    """
    Tests that
    """
    catcher: Optional[pytest.ExceptionInfo[Exception]] = None
    with ExitStack() as xstack:
        if isinstance(expected_result, type) and issubclass(expected_result, Exception):
            catcher = xstack.enter_context(pytest.raises(expected_result))
        result = file_uri_to_path(file_uri, path_class)
        logging.debug("result = %s", result)
    if catcher is not None:
        assert catcher is not None
        assert catcher.value is not None
    else:
        assert isinstance(expected_result, PurePath)
        assert expected_result == result