Skip to content

If BadZipFile is raised we should catch it and raise a different exception instead #54

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

Merged
merged 5 commits into from
Jul 19, 2013

Conversation

jlward
Copy link
Contributor

@jlward jlward commented Jul 19, 2013

No description provided.

@ghost ghost assigned jlward Jul 19, 2013
def test_malformed_docx_exception():
with NamedTemporaryFile(suffix='.docx') as f:
try:
convert(f.name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use raises for this. eg.

@raises(MalformedDocxException)
def test_malformed_docx_exception():
    ...

@winhamwr
Copy link
Contributor

After a bit of documentation and maybe that test refactor, this looks good.

jlward added a commit that referenced this pull request Jul 19, 2013
If BadZipFile is raised we should catch it and raise a different exception instead
@jlward jlward merged commit bae0a98 into master Jul 19, 2013
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward added a commit that referenced this pull request Mar 14, 2014
If BadZipFile is raised we should catch it and raise a different exception instead
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward added a commit that referenced this pull request Mar 14, 2014
If BadZipFile is raised we should catch it and raise a different exception instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants