def test_local_repo_typo(template, user_config_data, cloned_cookiecutter_path) -> None:
    """Wrong pointing to `cookiecutter.json` sub-directory should raise."""
    with pytest.raises(exceptions.RepositoryNotFound) as err:
        repository.determine_repo_dir(
            template=template,
            abbreviations={},
            clone_to_dir=user_config_data['cookiecutters_dir'],
            checkout=None,
            no_input=True,
            directory='wrong-dir',
        )

    wrong_full_cookiecutter_path = os.path.join(
        os.path.dirname(cloned_cookiecutter_path), 'wrong-dir'
    )
    assert str(err.value) == (
        'A valid repository for "{}" could not be found in the following '
        'locations:\n{}'.format(
            template,
            '\n'.join(
                [
                    os.path.join(template, 'wrong-dir'),
                    wrong_full_cookiecutter_path,
                ]
            ),
        )
    )
Wrong pointing to `cookiecutter.json` sub-directory should raise.
tests/repository/test_determine_repo_dir_finds_subdirectories.py