Use py.test as the test runner

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin 2015-09-01 16:24:07 -04:00
parent 6ac617bae1
commit c1ed1efde8
3 changed files with 20 additions and 20 deletions

View File

@ -1,5 +1,4 @@
coverage==3.7.1 coverage==3.7.1
flake8==2.3.0 mock>=1.0.1
mock >= 1.0.1 pytest==2.7.2
nose==1.3.4 pytest-cov==2.1.0
pep8==1.6.1

View File

@ -41,13 +41,10 @@ install_requires = [
tests_require = [ tests_require = [
'nose', 'pytest',
'flake8',
] ]
if sys.version_info < (2, 7):
tests_require.append('unittest2')
if sys.version_info[:1] < (3,): if sys.version_info[:1] < (3,):
tests_require.append('mock >= 1.0.1') tests_require.append('mock >= 1.0.1')

28
tox.ini
View File

@ -8,10 +8,14 @@ passenv =
setenv = setenv =
HOME=/tmp HOME=/tmp
deps = deps =
-rrequirements.txt -rrequirements-dev.txt
commands = commands =
nosetests -v --with-coverage --cover-branches --cover-package=compose --cover-erase --cover-html-dir=coverage-html --cover-html {posargs} py.test -v \
flake8 compose tests setup.py --cov=compose \
--cov-report html \
--cov-report term \
--cov-config=tox.ini \
{posargs}
[testenv:pre-commit] [testenv:pre-commit]
skip_install = True skip_install = True
@ -21,16 +25,16 @@ commands =
pre-commit install pre-commit install
pre-commit run --all-files pre-commit run --all-files
[testenv:py27] # Coverage configuration
deps = [run]
{[testenv]deps} branch = True
-rrequirements-dev.txt
[testenv:py34] [report]
deps = show_missing = true
{[testenv]deps}
flake8 [html]
nose directory = coverage-html
# end coverage configuration
[flake8] [flake8]
# Allow really long lines for now # Allow really long lines for now