-
Notifications
You must be signed in to change notification settings - Fork 310
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
Add helpful error messages when importing optional dependencies #125
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- How exhaustive were you in searching for places where this fails?
- Can you add a
tox
environment without the deps instead of doing thepragma: NO COVER
? Then you can integrate that into the coverage report?
google/auth/transport/grpc.py
Outdated
import grpc | ||
except ImportError: # pragma: NO COVER | ||
raise ImportError( | ||
'gRPC is not installed, please install grpcio to use the gRPC ' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Pretty exhaustive
This'll make the coverage environment impossible to run standalone, unless I'm misunderstanding the request? |
That's correct, but the contents of this PR indicate that true coverage could not be done in a single environment. |
@dhermes that was already the case, we have several import guards. |
We can do better than sprinkling the |
SGTM LGTM |
Resolves #101