def METHOD_NAME(
    mocker: MockerFixture, fixture_dir: FixtureDirGetter
) -> None:
    mock_create_poetry = mocker.patch(
        "poetry.inspection.info.Factory.create_poetry", side_effect=RuntimeError
    )
    mock_get_poetry_package = mocker.spy(PackageInfo, "_get_poetry_package")
    mock_get_pep517_metadata = mocker.patch(
        "poetry.inspection.info.get_pep517_metadata"
    )
    PackageInfo.from_directory(fixture_dir("inspection") / "demo_poetry_package")
    assert mock_create_poetry.call_count == 1
    assert mock_get_poetry_package.call_count == 1
    assert mock_get_pep517_metadata.call_count == 1