Feature/flake8 (#184)

* new: test: flake8 test

* chg: dev: add flake8 package for test

* chg: dev: remove coverage rule
This commit is contained in:
rachmadani haryono 2017-08-12 12:08:09 +08:00 committed by Arun Prakash Jana
parent c8fe3e3f16
commit 4d7385599b
4 changed files with 24 additions and 1 deletions

View File

@ -16,6 +16,7 @@ addons:
- devscripts
- zsh
script:
- python3 -m flake8
- python3 -m pytest ./tests/test_*.py --cov buku -vv
- git fetch --unshallow --tags origin
- ./tools/makedeb

21
setup.cfg Normal file
View File

@ -0,0 +1,21 @@
[flake8]
max-line-length = 139
ignore =
# C901 func is too complex
C901,
# E126 continuation line over-indented for hanging indent
E126,
# E127 continuation line over-indented for visual indent
E127,
# E226 missing whitespace around arithmetic operator
E226,
# E231 missing whitespace after ','
E231,
# E302 expected 2 blank lines, found 1
E302,
# E305 expected 2 blank lines after class or function definition, found 1
E305,
# E731 do not assign a lambda expression, use a def
E731,
# W292 no newline at end of file
W292,

View File

@ -17,7 +17,7 @@ with open('README.md', encoding='utf-8') as f:
tests_require = [
'pytest-cov', 'pytest-catchlog', 'hypothesis>=3.7.0', 'pytest>=3.1.2', 'py>=1.4.33',
'beautifulsoup4==4.6.0'
'beautifulsoup4==4.6.0', 'flake8>=3.4.1'
],
setup(

View File

@ -5,5 +5,6 @@ envlist = python33,python34,python35
commands =
pip install -e .[tests]
pip install -r requirements.txt
python -m flake8
pytest --cov buku -vv {posargs}
;pytest --cov buku -vv -m 'not slowtest and not non_tox'{posargs}