def METHOD_NAME(tmp_path: pathlib.Path, keep_cwd: pathlib.Path, monkeypatch: MonkeyPatch):
    """Test error during init when a directory cannot be created."""
    # Windows read-only on dir does not prevent file creation in dir
    if file_utils.is_windows():
        return
    os.chdir(tmp_path)
    config_dir = pathlib.Path(const.TRESTLE_CONFIG_DIR)
    config_dir.mkdir()
    config_dir.chmod(stat.S_IREAD)
    config_file = config_dir / const.TRESTLE_CONFIG_FILE
    command = 'trestle init -v'
    execute_command_and_assert(command, 1, monkeypatch)
    for directory in const.MODEL_DIR_LIST:
        dir_path = pathlib.Path(directory)
        assert not dir_path.exists()
        dist_dir_path = pathlib.Path(const.TRESTLE_DIST_DIR) / directory
        assert not dist_dir_path.exists()
    assert config_dir.exists()
    assert config_dir.is_dir()
    config_exists = False
    try:
        config_exists = config_file.exists()
    except Exception:
        pass
    assert not config_exists