-
Notifications
You must be signed in to change notification settings - Fork 39
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
Improve the exception message when an option within the rootpath section is missing from the user configuration file #2236
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2236 +/- ##
=======================================
Coverage 93.47% 93.48%
=======================================
Files 238 238
Lines 12927 12927
=======================================
+ Hits 12084 12085 +1
+ Misses 843 842 -1
|
raise KeyError(f'The "{project}" option is missing from the "rootpath" ' | ||
'section in the config-user.yml file.') |
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.
The pre-commit hooks made all the changes in this PR, except for this one, which is the one I made :)
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.
cheers @ehogan = looking good and very useful!
with mock.patch.dict(local.CFG, cfg): | ||
msg = rf"The \"{project}\" option is missing.*" | ||
with pytest.raises(KeyError, match=msg): | ||
local._get_rootpath(project) |
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.
well, you made these changes too, unless precommit hooks now write unit tests too (which would be fab) 😁
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 added these after I made that comment! 😝
Description
Closes #2235
Link to documentation:
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: