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

Merged
merged 1 commit into from Aug 15, 2017

Conversation

6 participants
@yash-nisar
Member

yash-nisar commented Aug 14, 2017

Remove pragma: no cover in check_prerequisites by adding
a 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

  • I read the commit guidelines and I've followed
    them.
  • I ran coala over my code locally. (All commits have to pass
    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:

The more you review, the more your score will grow at coala.io and we will
review your PRs faster!

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar
Member

yash-nisar commented Aug 14, 2017

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar
Member

yash-nisar commented Aug 14, 2017

Done @Makman2

@Nosferatul

This comment has been minimized.

Show comment
Hide comment
@Nosferatul

Nosferatul Aug 14, 2017

Member

I think this pr is ready, what do you say @Makman2 ?

Member

Nosferatul commented Aug 14, 2017

I think this pr is ready, what do you say @Makman2 ?

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Aug 14, 2017

Member

yes looks good :)

Member

Makman2 commented Aug 14, 2017

yes looks good :)

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2
Member

Makman2 commented Aug 14, 2017

ack 9d2563a

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar
Member

yash-nisar commented Aug 15, 2017

reack b1e3fbd

ElmLintBear: Remove `pragma: no cover`
Remove `pragma: no cover` in `check_prerequisites` by adding
a suitable test.

Closes #1996
Related to #1618
@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar

yash-nisar Aug 15, 2017

Member

I'm doing a minor change -> Replacing assertTrue with assertEqual as in the python docs.

This method should also be avoided when more specific methods are available (e.g. assertEqual(a, b) instead of assertTrue(a == b)), because they provide a better error message in case of failure.

Member

yash-nisar commented Aug 15, 2017

I'm doing a minor change -> Replacing assertTrue with assertEqual as in the python docs.

This method should also be avoided when more specific methods are available (e.g. assertEqual(a, b) instead of assertTrue(a == b)), because they provide a better error message in case of failure.

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar
Member

yash-nisar commented Aug 15, 2017

ack 0a25352

@yukiisbored

This comment has been minimized.

Show comment
Hide comment
@yukiisbored

yukiisbored Aug 15, 2017

Member

@rultor please merge

Member

yukiisbored commented Aug 15, 2017

@rultor please merge

@rultor

This comment has been minimized.

Show comment
Hide comment
@rultor

rultor Aug 15, 2017

@rultor please merge

@yukiisbored OK, I'll try to merge now. You can check the progress of the merge here

rultor commented Aug 15, 2017

@rultor please merge

@yukiisbored OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 0a25352 into coala:master Aug 15, 2017

6 of 9 checks passed

ci/circleci CircleCI is running your tests
Details
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
codecov/project 100% (target 100%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
review/gitmate/commit No issues with this one - go ahead! :)
Details
review/gitmate/manual This commit was acknowledged.
Details
review/gitmate/pr All is well! :) (0 problems solved)
Details
@rultor

This comment has been minimized.

Show comment
Hide comment
@rultor

rultor Aug 15, 2017

@rultor please merge

@yukiisbored Done! FYI, the full log is here (took me 2min)

rultor commented Aug 15, 2017

@rultor please merge

@yukiisbored Done! FYI, the full log is here (took me 2min)

@yash-nisar yash-nisar deleted the yash-nisar:elm-pragma branch Aug 15, 2017

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar

yash-nisar Aug 15, 2017

Member

Thanks @yukiisbored 😄

Member

yash-nisar commented Aug 15, 2017

Thanks @yukiisbored 😄

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Aug 15, 2017

Member

I'm doing a minor change -> Replacing assertTrue with assertEqual as in the python docs.

This method should also be avoided when more specific methods are available (e.g. assertEqual(a, b) instead of assertTrue(a == b)), because they provide a better error message in case of failure.

Actually the docs want you to avoid such operators like == to use in assertTrue. If your result should be true in the end, assertTrue is just effective^^ however like this is also okay^^

Member

Makman2 commented Aug 15, 2017

I'm doing a minor change -> Replacing assertTrue with assertEqual as in the python docs.

This method should also be avoided when more specific methods are available (e.g. assertEqual(a, b) instead of assertTrue(a == b)), because they provide a better error message in case of failure.

Actually the docs want you to avoid such operators like == to use in assertTrue. If your result should be true in the end, assertTrue is just effective^^ however like this is also okay^^

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Aug 15, 2017

Member

But if you do a change, don't ack it yourself, it has to be reviewed again by someone else.

Member

Makman2 commented Aug 15, 2017

But if you do a change, don't ack it yourself, it has to be reviewed again by someone else.

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar

yash-nisar Aug 15, 2017

Member

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 😉 :

In general, self.assertTrue('some_string') does not fail. So even if check_prerequisites() returns 'You are not connected to the internet.', the test will pass.
This can be avoided either by explicitly doing self.assertTrue(URLBear.check_prerequisites() == True) or by self.assertEqual(URLBear.check_prerequisites(), True). The latter one is more preferred.

Member

yash-nisar commented Aug 15, 2017

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 😉 :

In general, self.assertTrue('some_string') does not fail. So even if check_prerequisites() returns 'You are not connected to the internet.', the test will pass.
This can be avoided either by explicitly doing self.assertTrue(URLBear.check_prerequisites() == True) or by self.assertEqual(URLBear.check_prerequisites(), True). The latter one is more preferred.

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Aug 15, 2017

Member

Actually the docs want you to avoid such operators like == to use in assertTrue. If your result should be true in the end, assertTrue is just effective^^ however like this is also okay^^

Nvm this, assertEqual(x, True) and assertTrue(x) are two different things. assertTrue invokes bool on the given expression, while assertEqual does not.

Member

Makman2 commented Aug 15, 2017

Actually the docs want you to avoid such operators like == to use in assertTrue. If your result should be true in the end, assertTrue is just effective^^ however like this is also okay^^

Nvm this, assertEqual(x, True) and assertTrue(x) are two different things. assertTrue invokes bool on the given expression, while assertEqual does not.

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar

yash-nisar Aug 15, 2017

Member

Yeah, I agree 👍 . Just wanted to make sure things like these -> self.assertTrue('some_string') do not pass and are taken care of. 😉

Member

yash-nisar commented Aug 15, 2017

Yeah, I agree 👍 . Just wanted to make sure things like these -> self.assertTrue('some_string') do not pass and are taken care of. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment