Skip to content

bpo-39064: make ZipFile raise BadZipFile instead of ValueError when reading a corrupt file #30863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Jan 24, 2022

I don't know how to write a test for this.

https://bugs.python.org/issue39064

@arhadthedev
Copy link
Member

I don't know how to write a test for this.

I see it as a two step smoke test:

  1. Write a specially crafted string into a temporary file using tmp_path (a manual from docs.pytest.org)
  2. Try to open it with a tested method

@iritkatriel
Copy link
Member Author

I don't know how to write a test for this.

I see it as a two step smoke test:

  1. Write a specially crafted string into a temporary file using tmp_path (a manual from docs.pytest.org)
  2. Try to open it with a tested method

The part I'm stuck on is how to craft the string that will cause this error.

@iritkatriel
Copy link
Member Author

Superceded by 32291.

@iritkatriel iritkatriel closed this Apr 4, 2022
@jvoisin jvoisin mannequin mentioned this pull request Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants