def test_local_extension_not_available() -> None:
    """Test handling of included but unavailable local extension."""
    context = {'cookiecutter': {'_extensions': ['foobar']}}

    with pytest.raises(UnknownExtension) as err:
        StrictEnvironment(context=context, keep_trailing_newline=True)

    assert 'Unable to load extension: ' in str(err.value)
Test handling of included but unavailable local extension.
tests/test_cli.py