Skip to content
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

lint: correct flake8 B017 with specific exceptions #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 <miketheman@gmail.com>
@@ -279,7 +279,7 @@ def test_request_make_body_seekable_cleans_up_threadmanger_on_exception(
assert len(manager.stack) == 0
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