Skip to content

Conversation

@miketheman
Copy link

Using more specific exceptions is useful to ensure that another, unexpected exception isn't raised
during testing.

Refs: https://github.com/PyCQA/flake8-bugbear#list-of-warnings

Using more specific exceptions is useful to ensure
that another, unexpected exception isn't raised
during testing.

Refs: https://github.com/PyCQA/flake8-bugbear#list-of-warnings

Signed-off-by: Mike Fiedler <[email protected]>
app = config.make_wsgi_app()
app = webtest.TestApp(app)
with pytest.raises(Exception):
with pytest.raises(IOError):
Copy link
Author

Choose a reason for hiding this comment

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

I selected IOError here as that's the ancestor for webob.request.DisconnectionError

@miketheman
Copy link
Author

@mmerickel Any chance you've got time to review this, and maybe some others here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant