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

_client_info 'except' block is not tested #171

Closed
busunkim96 opened this issue Aug 7, 2019 · 4 comments
Closed

_client_info 'except' block is not tested #171

busunkim96 opened this issue Aug 7, 2019 · 4 comments
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@busunkim96
Copy link
Contributor

busunkim96 commented Aug 7, 2019

This 'except' block is the only line missing unit test coverage.

try:
    _client_info = gapic_v1.client_info.ClientInfo(
        gapic_version=pkg_resources.get_distribution("google-cloud-workflows").version
    )
except pkg_resources.DistributionNotFound:
    _client_info = gapic_v1.client_info.ClientInfo()

https://github.com/googleapis/google-cloud-python-private/blob/530c9c710b768c444eba4bd7c8639096affae89a/workflows/google/cloud/workflows_v1alpha1/services/workflows/client.py#L431

@software-dov software-dov added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 7, 2019
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Aug 8, 2019
@lukesneeringer
Copy link
Contributor

lukesneeringer commented Aug 12, 2019

Right now, we generate a .coveragerc file which excludes that line.

That line is really tough to test. It is module level, not function level (and should be).

I assume you are plowing over our .coveragerc with synthtool. That makes sense to me, but do you think it would be possible to add that to your exclude_lines?

@lukesneeringer lukesneeringer added type: question Request for information or clarification. Not an issue. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 12, 2019
@busunkim96
Copy link
Contributor Author

Ah, I forgot we had .coveragerc in our templates. I'll make that change. Thank you. :)

@tseaver
Copy link
Contributor

tseaver commented Oct 22, 2020

Somehow, the templated .coveragerc file is not being generated for Firestore via synthtool.

@tseaver tseaver reopened this Oct 22, 2020
@busunkim96
Copy link
Contributor Author

@tseaver The missing .coveragerc issue is tracked in #437

gcf-merge-on-green bot pushed a commit to googleapis/python-firestore that referenced this issue Oct 23, 2020
Note that the synthtool-generated `.coveragerc` (see #224) does *not* include all changes needed for 100% coverage:  see:

- googleapis/gapic-generator-python#171
- googleapis/gapic-generator-python#437

Closes #92.
Closes #195.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

5 participants