From c1ed1efde81dc2c93b5231cd67416fb89091377e Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 1 Sep 2015 16:24:07 -0400 Subject: [PATCH] Use py.test as the test runner Signed-off-by: Daniel Nephin --- requirements-dev.txt | 7 +++---- setup.py | 5 +---- tox.ini | 28 ++++++++++++++++------------ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 33a491515..73b807835 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,4 @@ coverage==3.7.1 -flake8==2.3.0 -mock >= 1.0.1 -nose==1.3.4 -pep8==1.6.1 +mock>=1.0.1 +pytest==2.7.2 +pytest-cov==2.1.0 diff --git a/setup.py b/setup.py index 33335047b..e93dafc62 100644 --- a/setup.py +++ b/setup.py @@ -41,13 +41,10 @@ install_requires = [ tests_require = [ - 'nose', - 'flake8', + 'pytest', ] -if sys.version_info < (2, 7): - tests_require.append('unittest2') if sys.version_info[:1] < (3,): tests_require.append('mock >= 1.0.1') diff --git a/tox.ini b/tox.ini index 4b27a4e9b..71ab4fc9c 100644 --- a/tox.ini +++ b/tox.ini @@ -8,10 +8,14 @@ passenv = setenv = HOME=/tmp deps = - -rrequirements.txt + -rrequirements-dev.txt commands = - nosetests -v --with-coverage --cover-branches --cover-package=compose --cover-erase --cover-html-dir=coverage-html --cover-html {posargs} - flake8 compose tests setup.py + py.test -v \ + --cov=compose \ + --cov-report html \ + --cov-report term \ + --cov-config=tox.ini \ + {posargs} [testenv:pre-commit] skip_install = True @@ -21,16 +25,16 @@ commands = pre-commit install pre-commit run --all-files -[testenv:py27] -deps = - {[testenv]deps} - -rrequirements-dev.txt +# Coverage configuration +[run] +branch = True -[testenv:py34] -deps = - {[testenv]deps} - flake8 - nose +[report] +show_missing = true + +[html] +directory = coverage-html +# end coverage configuration [flake8] # Allow really long lines for now