def test_debug_list_installed_templates(
    cli_runner, debug_file, user_config_path
) -> None:
    """Verify --list-installed command correct invocation."""
    fake_template_dir = os.path.dirname(os.path.abspath('fake-project'))
    os.makedirs(os.path.dirname(user_config_path))
    # Single quotes in YAML will not parse escape codes (\).
    Path(user_config_path).write_text(f"cookiecutters_dir: '{fake_template_dir}'")
    Path("fake-project", "cookiecutter.json").write_text('{}')

    result = cli_runner(
        '--list-installed',
        '--config-file',
        user_config_path,
        str(debug_file),
    )

    assert "1 installed templates:" in result.output
    assert result.exit_code == 0
Verify --list-installed command correct invocation.
tests/test_cli.py