From 2c6dee69ad055feeae11b475715a6a1cdc072664 Mon Sep 17 00:00:00 2001 From: Tom Marks Date: Wed, 27 Jun 2018 16:18:03 -0400 Subject: [PATCH] Fixes travis test invocation and updates tox to match - Moves to py.test as gives better error messages --- .travis.yml | 1 + requirements_dev.txt | 1 + setup.cfg | 2 +- setup.py | 4 ++-- tox.ini | 5 +++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94d7067..0dd26d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ install: # Command to run tests, e.g. python setup.py test script: - flake8 thanks + - pip list - python setup.py test diff --git a/requirements_dev.txt b/requirements_dev.txt index 9647798..6c8ebda 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -8,3 +8,4 @@ coverage==4.4.2 Sphinx==1.6.5 twine==1.9.1 ddt +pytest diff --git a/setup.cfg b/setup.cfg index b087132..359d05c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,4 +19,4 @@ exclude = docs max-line-length = 120 [aliases] - +test=pytest diff --git a/setup.py b/setup.py index a347a1d..924c1c0 100644 --- a/setup.py +++ b/setup.py @@ -22,10 +22,11 @@ ] setup_requirements = [ - 'nose' + "pytest-runner" ] test_requirements = [ + "pytest", 'ddt', ] @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], - test_suite='nose.collector', tests_require=test_requirements, setup_requires=setup_requirements, ) diff --git a/tox.ini b/tox.ini index 5ce316e..9f32085 100644 --- a/tox.ini +++ b/tox.ini @@ -14,8 +14,9 @@ deps = flake8 commands = flake8 thanks [testenv] +whitelist_externals= + py.test setenv = PYTHONPATH = {toxinidir} -commands = python setup.py nosetests - +commands = python setup.py test