From e8a7041c013103d1441abdb1847ba67b8dbba1d9 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 2 Dec 2016 10:56:19 +0100 Subject: [PATCH] =?UTF-8?q?From=20review=20(by=20Sybren=20St=C3=BCvel):=20?= =?UTF-8?q?use=20tox=20for=20py2/py3=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (and updated docs) --- README.md | 4 ++-- setup.py | 3 +-- tox.ini | 13 +++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 tox.ini diff --git a/README.md b/README.md index be2f6c8..53c438e 100644 --- a/README.md +++ b/README.md @@ -15,5 +15,5 @@ Python 2.x support may be dropped in the future. To run the tests just do: - >>> pip install pytest - >>> py.test tests/ + >>> pip install tox + >>> tox diff --git a/setup.py b/setup.py index d42fb61..8d5e657 100644 --- a/setup.py +++ b/setup.py @@ -10,8 +10,7 @@ setup( license='GNU General Public License v2 or later (GPLv2+)', packages=find_packages('.', exclude=['tests']), tests_require=[ - 'pytest>=2.9.1', - 'pytest-cov>=2.2.1', + 'tox>=2.5.0', ], zip_safe=True, ) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..e9251d6 --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +[tox] +envlist = {2.7,3.5} + +[testenv] +basepython = + 2.7: python2.7 + 3.5: python3.5 + +deps = + pytest + pytest-cov + +commands = py.test