Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Allowing default flags in run_flow(). #426

Merged
merged 1 commit into from Feb 20, 2016

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Feb 20, 2016

Resurrects #360. I double checked two different default behaviors to verify this is the "right" way:

>>> # Method 1
>>> flags = argparser.parse_args()
>>> flags
Namespace(auth_host_name='localhost', auth_host_port=[8080, 8090], logging_level='ERROR', noauth_local_webserver=False)
>>> # Method 2 (same result, but takes more code)
>>> import argparse
>>> parser = argparse.ArgumentParser(parents=[argparser])
>>> flags = parser.parse_args()
>>> flags
Namespace(auth_host_name='localhost', auth_host_port=[8080, 8090], logging_level='ERROR', noauth_local_webserver=False)

@@ -113,7 +113,7 @@ def log_message(self, format, *args):


@util.positional(3)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@nathanielmanistaatgoogle
Copy link
Contributor

Test coverage?

@dhermes
Copy link
Contributor Author

dhermes commented Feb 20, 2016

I was under the assumption that there were no tests for this module, let me double check.

@dhermes
Copy link
Contributor Author

dhermes commented Feb 20, 2016

OK I was wrong, but correct in spirit. The tests for the tools module are essentially 0, and testing run_flow() would increase the size of this PR by a factor of 20, so it should probably be its own thing.

@nathanielmanistaatgoogle
Copy link
Contributor

Okay. I was caught by the -0.03% coverage decrease and for once I looked at it and said "wait, no, that's a real thing and not just noise, this change introduces new code that is definitely not covered".

Merge when you like.

@dhermes
Copy link
Contributor Author

dhermes commented Feb 20, 2016

FWIW I really want some help to sprint through #212 and make any drop below 100% not allowed

dhermes added a commit that referenced this pull request Feb 20, 2016
Allowing default flags in run_flow().
@dhermes dhermes merged commit 1f18216 into googleapis:master Feb 20, 2016
@dhermes dhermes deleted the run-with-360 branch February 20, 2016 18:16
@dhermes dhermes mentioned this pull request Mar 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants