Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

chore: bump test coverage to 100%#364

Merged
plamut merged 7 commits into
googleapis:masterfrom
plamut:bump-coverage
Apr 9, 2021
Merged

chore: bump test coverage to 100%#364
plamut merged 7 commits into
googleapis:masterfrom
plamut:bump-coverage

Conversation

@plamut

@plamut plamut commented Apr 3, 2021

Copy link
Copy Markdown
Contributor

Closes #363.
Closes #367.

This PR fixes the code lines/paths that currently drag the overall coverage down.

The majority are error code paths in tests that are never executed if a test passes, and abstract methods that we do not explicitly test if they indeed raise NotImplementedError. The rest is some unused code and a few other misc. cleanups.

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

plamut added 6 commits April 3, 2021 10:45
One of the tests attempted to set an ERROR status on a batch, but
that batch was a mock, meaning that setting a status had no effect.

If there was a bug in the corresponding code path, the test would
probably not catch it, as that code patch would not be taken.
The tests for flattened arguments to the sync pull() method
hit a code path that emits a deprecation warning, but that
warning is expected and should not clutter the test output.
@plamut plamut requested a review from a team April 3, 2021 09:44
@product-auto-label product-auto-label Bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Apr 3, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Apr 3, 2021
@tseaver tseaver requested a review from jimfulton April 5, 2021 18:17
Comment thread google/cloud/pubsub_v1/publisher/flow_controller.py Outdated
Comment thread synth.py
@plamut plamut requested a review from jimfulton April 8, 2021 08:16
@plamut plamut merged commit 5812018 into googleapis:master Apr 9, 2021
@plamut plamut deleted the bump-coverage branch April 9, 2021 05:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: pubsub Issues related to the googleapis/python-pubsub API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DeprecationWarnings in unit tests should be trapped / asserted Bump required unit test coverage to 100%

2 participants