def test_bad_zip_file(mocker, clone_dir) -> None:
    """In `unzip()`, a corrupted zip file raises an error."""
    mocker.patch(
        'cookiecutter.zipfile.prompt_and_delete', return_value=True, autospec=True
    )

    with pytest.raises(InvalidZipRepository):
        zipfile.unzip(
            'tests/files/bad-zip-file.zip', is_url=False, clone_to_dir=str(clone_dir)
        )
In `unzip()`, a corrupted zip file raises an error.
tests/zipfile/test_unzip.py