-
Notifications
You must be signed in to change notification settings - Fork 21
implement a skip_config_creation option in get_user_info #250
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 380 390 +10
=========================================
+ Hits 380 390 +10
|
@@ -22,6 +22,9 @@ def _run_tests(inputs, expected): | |||
config = get_user_info(args) | |||
assert config.get("username") == expected_username | |||
assert config.get("email") == expected_email | |||
config = get_user_info(args, skip_config_creation=True) | |||
assert config.get("username") == expected_username | |||
assert config.get("email") == expected_email |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we can reuse this run_test function for most test cases for different skip_config_creation
except when there're no inputs or files, so I added this here
# Test skipping config creation, expecting None values | ||
config = get_user_info(args, skip_config_creation=True) | ||
assert config.get("username") is None | ||
assert config.get("email") is None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have to rewrite this from run_test for no args/inputs/config files
haha, that was a mistake on my part. I am not sure tbh. I am ok with either "user-data* or "user-info". @bobleesj @yucongalicechen which do you think is more obvious? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh I find the tests confusing for the get_user_info/data
workflow. Can we maybe have them written following the new standards that @bobleesj and I worked out?
assert config.get("email") == expected_email | ||
|
||
# Test skipping config creation, expecting None values | ||
config = get_user_info(args, skip_config_creation=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a little confused here....isn't this getting args
as written?
closed as replaced by #253 |
closes #244
@sbillinge ready for some feedback
btw I see in the docs you used
get_user_data
instead ofget_user_info
at a couple places, which seems to be a better name, shall we change toget_user_data
instead?