-
Notifications
You must be signed in to change notification settings - Fork 580
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
ElmLintBear: Remove pragma: no cover
#1997
Conversation
tests/elm/ElmLintBearTest.py
Outdated
def test_check_prerequisites(self): | ||
_shutil_which = shutil.which | ||
try: | ||
shutil.which = lambda *args, **kwargs: 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.
use @patch
on the test method. You can patch the which
you imported from shutil
, so the patch-module-string gets bears.elm.ElmLintBear.which
. Then you don't need to change the import inside ElmLintBear
, you just have to remove the pragma.
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.
Cool, on it. 👍
tests/elm/ElmLintBearTest.py
Outdated
@@ -1,4 +1,6 @@ | |||
import shutil |
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.
This file contains unused source code.
PyUnusedCodeBear, severity NORMAL, section flakes
.
The issue can be fixed by applying the following patch:
--- a/tests/elm/ElmLintBearTest.py
+++ b/tests/elm/ElmLintBearTest.py
@@ -1,4 +1,3 @@
-import shutil
from queue import Queue
from unittest.mock import patch
Done @Makman2 |
I think this pr is ready, what do you say @Makman2 ? |
yes looks good :) |
ack 9d2563a |
reack b1e3fbd |
Remove `pragma: no cover` in `check_prerequisites` by adding a suitable test. Closes coala#1996 Related to coala#1618
I'm doing a minor change -> Replacing
|
ack 0a25352 |
@rultor please merge |
@yukiisbored OK, I'll try to merge now. You can check the progress of the merge here |
@yukiisbored Done! FYI, the full log is here (took me 2min) |
Thanks @yukiisbored 😄 |
Actually the docs want you to avoid such operators like |
But if you do a change, don't ack it yourself, it has to be reviewed again by someone else. |
Sure, will keep that in mind. I felt the need to change it because I missed a bug in my travis PR. Also, I've opened an issue with regard to this that will avoid future bugs 😉 :
|
Nvm this, |
Yeah, I agree 👍 . Just wanted to make sure things like these -> |
Remove
pragma: no cover
incheck_prerequisites
by addinga suitable test.
Closes #1996
Related to #1618
For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!
Checklist
them.
individually. It is not sufficient to have "fixup commits" on your PR,
our bot will still report the issues for the previous commit.) You will
likely receive a lot of bot comments and build failures if coala does not
pass on every single commit!
After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.
Please consider helping us by reviewing other peoples pull requests as well:
cobot mark wip <URL>
to get it outof the review queue.
The more you review, the more your score will grow at coala.io and we will
review your PRs faster!