Add new extension for detecting integer comparisons against zero #1243

Merged
merged 1 commit into from Dec 31, 2016

Conversation

Projects
None yet
3 participants
@atodorov
Contributor

atodorov commented Dec 28, 2016

Similar to #1183 but for comparisons to zero. Again made it as an extension because this may not be what you need. I've used this to refactor a great deal of projects I've been working on though where such comparisons are not needed and expand the size of mutation test matrix in the order of 1000s of additional cases.

Please review and comment, thanks.

@PCManticore

This comment has been minimized.

Show comment
Hide comment
@PCManticore

PCManticore Dec 30, 2016

Member

Thank you, looks nice and clean.

By the way, we are using pytest since some recent changes. Can you modify your code so that it won't complain about WC1 /home/travis/build/PyCQA/pylint/.tox/py35/lib/python3.5/site-packages/pylint/test/extensions/test_comparetozero.py cannot collect test class 'TestReporter' because it has a __init__ constructor? Thank you.

Member

PCManticore commented Dec 30, 2016

Thank you, looks nice and clean.

By the way, we are using pytest since some recent changes. Can you modify your code so that it won't complain about WC1 /home/travis/build/PyCQA/pylint/.tox/py35/lib/python3.5/site-packages/pylint/test/extensions/test_comparetozero.py cannot collect test class 'TestReporter' because it has a __init__ constructor? Thank you.

@atodorov

This comment has been minimized.

Show comment
Hide comment
@atodorov

atodorov Dec 30, 2016

Contributor

PR updated for the pytest error listed above but Travis fails, I believe due to unrelated issues.

Contributor

atodorov commented Dec 30, 2016

PR updated for the pytest error listed above but Travis fails, I believe due to unrelated issues.

@degustaf

This comment has been minimized.

Show comment
Hide comment
@degustaf

degustaf Dec 30, 2016

Contributor

@atodorov Yeah, a change made to astroid is making that test fail. The PR to fix it has already been made.

Contributor

degustaf commented Dec 30, 2016

@atodorov Yeah, a change made to astroid is making that test fail. The PR to fix it has already been made.

@PCManticore

This comment has been minimized.

Show comment
Hide comment
Member

PCManticore commented Dec 31, 2016

Thank you @atodorov

@PCManticore PCManticore merged commit 5341437 into PyCQA:master Dec 31, 2016

0 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment