Skip to content

Commit

Permalink
Run pylint for tests as well in default checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Feb 21, 2017
1 parent 8645e91 commit b7b0b53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ check-docs:
$(MAKE) "docs" > /dev/null

.PHONY: check-lint
check-lint: check-flake8 check-pylint check-travis.yml
check-lint: check-flake8 check-pylint check-pylint-tests check-travis.yml

.PHONY: check-flake8
check-flake8:
Expand All @@ -63,12 +63,12 @@ check-pylint: yaml4rst/
if [[ "$(PYTHON_VERSION)" == "3.6" ]]; then \
echo "Skip test as pylint had issues with this version"; \
else \
pylint "$<" --reports=n --rcfile .pylintrc --disable=C,I,R; \
pylint "$<" --reports=n --rcfile .pylintrc --disable=locally-disabled,missing-docstring,too-many-statements,too-many-locals,too-many-branches,too-many-instance-attributes,too-many-boolean-expressions,too-many-arguments; \
fi

.PHONY: check-pylint-tests
check-pylint-tests: tests/
pylint "$<" --reports=n --rcfile .pylintrc --disable=protected-access,missing-docstring,invalid-name,too-many-public-methods,too-many-lines
pylint "$<" --reports=n --rcfile .pylintrc --disable=protected-access,missing-docstring,invalid-name,too-many-public-methods,too-many-lines,locally-disabled

.PHONY: check-radon
check-radon: yaml4rst/
Expand Down
4 changes: 2 additions & 2 deletions tests/test_reformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import unittest
# Python 2 does not yet have `mock` which was a separate package back then.

from nose.tools import assert_equal, assert_not_equal, assert_raises_regexp, nottest # NOQA
from nose.tools import assert_equal, assert_not_equal, assert_raises_regexp # NOQA
from testfixtures import log_capture, tempdir

from yaml4rst.reformatter import YamlRstReformatter, YamlRstReformatterError, LOG
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_process_user_invalid_ansible_full_role_name(self, log):
),
)

@unittest.mock.patch('sys.stdout', new_callable=StringIO)
@unittest.mock.patch('sys.stdout', new_callable=StringIO) # pylint: disable=no-member
@tempdir()
def test_read_write_file(self, mock_stdout, d):
file_path = os.path.join(d.path, 'main.yml')
Expand Down

0 comments on commit b7b0b53

Please sign in to comment.