add flake8 and mypy on test

This commit is contained in:
Barak Michener 2018-09-06 00:45:42 -07:00
parent 63bf05b792
commit 106c8cd8b6
4 changed files with 10 additions and 4 deletions

View file

@ -16,7 +16,10 @@ test_unit: venv
lint: venv lint: venv
. venv/bin/activate && flake8 . . venv/bin/activate && flake8 .
mypy: venv
. venv/bin/activate && mypy .
deps: venv deps: venv
. venv/bin/activate && pip install -U -r requirements.txt . venv/bin/activate && pip install -U -r requirements.txt
test: test_unit lint test: test_unit lint mypy

View file

@ -1,4 +1,7 @@
pytest pytest
pytest-cov pytest-cov
pytest-mypy
pytest-flake8
flake8 flake8
pip pip
mypy

View file

@ -9,7 +9,7 @@ ignore = NONE
max-line-length = 120 max-line-length = 120
[tool:pytest] [tool:pytest]
addopts = --cov={{cookiecutter.project_name}} --cov-fail-under=80 --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html -vvv addopts = --cov={{cookiecutter.project_name}} --cov-fail-under=80 --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html --mypy --flake8 -vvv
[coverage:run] [coverage:run]
branch = True branch = True

View file

@ -2,5 +2,5 @@
# from mock import MagicMock # from mock import MagicMock
def test_true(): def test_true() -> None:
assert True == True assert True