Add helpful error messages when importing optional dependencies#125
Add helpful error messages when importing optional dependencies#125
Conversation
dhermes
left a comment
There was a problem hiding this comment.
- How exhaustive were you in searching for places where this fails?
- Can you add a
toxenvironment 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