From 084e65fe320148143571c8e054bc485887e34714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 4 Sep 2019 09:50:05 +0200 Subject: [PATCH] Set up test infrastructur MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use pytest with tox to run tests. - Update travis to run tests via tox. - Update list of supported Python versions. Technically 2.6 is still supported, but it does not work with tox, so we can't run the tests there. Running tests with `setup.py test` still uses nose as runner. Signed-off-by: Lubomír Sedlář --- .travis.yml | 20 ++++++++++++-------- tox.ini | 6 ++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index b16045b..cd1dea2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,13 @@ language: python -python: - - "2.6" - - "2.7" - - "3.3" - - "3.4" - - "3.5" - - "3.6" -script: "python setup.py test" +matrix: + include: + - python: "2.7" + env: TOXENV=py27 + - python: "3.6" + env: TOXENV=py36 + - python: "3.7" + env: TOXENV=py37 +install: + - pip install tox +script: + - tox -e $TOXENV diff --git a/tox.ini b/tox.ini index 2a75307..0f9ed0e 100644 --- a/tox.ini +++ b/tox.ini @@ -5,3 +5,9 @@ max-line-length = 140 [tox] skipsdist = True +envlist = py27,py36,py37,py38 +skip_missing_interpreters = True + +[testenv] +deps = pytest +commands = pytest