-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 coverage for 'gcloud._apitools.transfer' #1207
Add coverage for 'gcloud._apitools.transfer' #1207
Conversation
|
||
@property | ||
def progress(self): | ||
return self.__progress |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Please don't add code with an XXX in it. If you want to make a TODO, use GitHub's world class issue tracking system. |
I've pulled the XXX out in #1210, along with the other pep8 / pylint cleanups. |
Note that the comments (w/o the XXX) needs to stay in the code, FBO the next unfortunate soul who stumbles across that bit of RFC abuse. |
This is becoming quite cumbersome to review. Why couldn't you fold the changes into this PR? |
@dhermes can you get past the OCD about the Or we could blow off this PR (and #1209) and just go to reviewing #1210 instead. |
I'm +1 to pulling out the XXX's and moving them to an issue. Right now, it's unclear to anyone else what the meaning of "XXX" is here, which means that the bus-factor (what happens if you get hit by a bus) comes into play. It looks like there's only 3 issues to create anyway, right? if so, let's just do that. |
Why merge to master then? Why not do this in a GoogleCloudPlatform branch and then when lint is on it gets into master..>? |
Maybe that would have been better, but.... We have already merged the forked The plan was to get full test coverage, then clean up and pare down the code. This PR is really about test coverage: the "XXX" comments are a result of my outrage from trying to understand / cover the code. I guess we could revert #1189, #1190, #1191, #1191, #1192, #1193, and close this one, and re-do them against a |
Just merge it. We've got to have a plan going forward to avoid situations like this. |
Add coverage for 'gcloud._apitools.transfer'
ISTM that an integration branch is the right long-term strategy for changes which we want to break up into multiple PRs (for ease of review) but not land on |
Sure thing |
Apologies: this PR is a ginormous pile of tests, with more cleanups than the earlier ones.
Looking forward to the sound of the chainsaw to get rid of deadwood now that coverage is complete.
N.B.: due to https://github.com/nose-devs/nose/blob/00ae0930e3bfad41279a0899e8c699f2ac1ff209/nose/loader.py#L164, the default
tox -e cover
misses all these tests. I believe I'm going to have to rename the sub-package (gcloud/_apitools
->gcloud/streaming
, maybe). Workaround is to run the following aftertox -e cover
:$ .tox/cover/bin/nosetests \ --with-coverage --cover-package=gcloud --cover-tests --cover-branches \ gcloud/_apitools ...................................................................................................................................................................................................................... Name Stmts Miss Branch BrPart Cover Missing -------------------------------------------------------------------------------------- gcloud.py 3 0 0 0 100% gcloud/_apitools.py 0 0 0 0 100% gcloud/_apitools/buffered_stream.py 27 0 4 0 100% gcloud/_apitools/exceptions.py 41 0 0 0 100% gcloud/_apitools/http_wrapper.py 154 0 70 0 100% gcloud/_apitools/stream_slice.py 22 0 4 0 100% gcloud/_apitools/test_buffered_stream.py 93 0 0 0 100% gcloud/_apitools/test_exceptions.py 65 0 0 0 100% gcloud/_apitools/test_http_wrapper.py 584 0 30 0 100% gcloud/_apitools/test_stream_slice.py 58 0 0 0 100% gcloud/_apitools/test_transfer.py 1693 0 34 0 100% gcloud/_apitools/test_util.py 52 0 4 0 100% gcloud/_apitools/transfer.py 445 0 180 0 100% gcloud/_apitools/util.py 25 0 14 0 100% gcloud/_testing.py 12 0 4 0 100% -------------------------------------------------------------------------------------- TOTAL 3274 0 344 0 100% ---------------------------------------------------------------------- Ran 214 tests in 0.055s