From 0b184f3bf088105ac06b86419508ccabaabb8a86 Mon Sep 17 00:00:00 2001 From: William Ting Date: Thu, 28 Apr 2016 22:44:27 -0700 Subject: [PATCH] Update tox. --- Makefile | 3 ++- tox.ini | 39 ++++++++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index e59d6c9..99c4bac 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ docs: pandoc -s -w man docs/manpage_header.md docs/header.md docs/body.md -o docs/autojump.1 pandoc -s -w markdown docs/header.md docs/install.md docs/body.md -o README.md -lint: +flake8: @flake8 ./ --config=tox.ini release: docs @@ -41,6 +41,7 @@ tar: test: lint @find . -type f -iname "*.pyc" -delete tox + tox -e flake8 test-fast: @find . -type f -iname "*.pyc" -delete diff --git a/tox.ini b/tox.ini index 9888afe..6e227a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,34 +1,43 @@ [tox] envlist = - py26, - py27, - py32, - py33, - py34 + py26, + py27, + py32, + py33, + py34 # ignore missing setup.py skipsdist = True [testenv] +setenv = + PYTHONDONTWRITEBYTECODE = 1 deps = mock + coverage pytest -commands = py.test -rsxX -q +commands = + coverage run --source=bin/ -m pytest -vv -rxs --tb native -s --durations 10 --strict {posargs:tests} + coverage report -m [testenv:flake8] -deps = flake8 -commands = flake8 . +deps = + flake8 + pyflakes + pep8 + mccabe +commands = + flake8 . [flake8] filename = - *.py, - autojump + *.py, + autojump ignore = - E126, - E128 -max-line-length = 79 -max-complexity = 10 + E126, + E128 +max-line-length = 131 +max-complexity = 20 show-pep8 = True [pytest] -addopts = -rsxX -q norecursedirs = .git .tox docs