From e5d80645347fc7e67efdceb97df8e95d140b283d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 5 Dec 2016 19:59:19 -0200 Subject: [PATCH] Test using pytest 3.0 Fix #99 --- .travis.yml | 42 ++++++++++++++++++++------------------ appveyor.yml | 23 +++++++++++++++++++++ setup.py | 2 +- testing/acceptance_test.py | 2 +- tox.ini | 7 +++---- 5 files changed, 50 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b17d87..9c6aee1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,26 +5,28 @@ python: install: pip install -U tox setuptools_scm env: matrix: - - TESTENV=py26-pytest26 - - TESTENV=py26-pytest27 - - TESTENV=py26-pytest28 - - TESTENV=py26-pytest29 - - TESTENV=py27-pytest26 - - TESTENV=py27-pytest27 - - TESTENV=py27-pytest28 - - TESTENV=py27-pytest29 - - TESTENV=py34-pytest26 - - TESTENV=py34-pytest27 - - TESTENV=py34-pytest28 - - TESTENV=py34-pytest29 - - TESTENV=py35-pytest27 - - TESTENV=py35-pytest28 - - TESTENV=py35-pytest29 - - TESTENV=py27-pytest28-pexpect - - TESTENV=py35-pytest28-pexpect - - TESTENV=flakes - - TESTENV=readme -script: tox --recreate -e $TESTENV + # note: please use "tox --listenvs" to populate the build matrix + - TOXENV=py26-pytest27 + - TOXENV=py26-pytest28 + - TOXENV=py26-pytest29 + - TOXENV=py26-pytest30 + - TOXENV=py27-pytest27 + - TOXENV=py27-pytest28 + - TOXENV=py27-pytest29 + - TOXENV=py27-pytest30 + - TOXENV=py34-pytest27 + - TOXENV=py34-pytest28 + - TOXENV=py34-pytest29 + - TOXENV=py34-pytest30 + - TOXENV=py35-pytest27 + - TOXENV=py35-pytest28 + - TOXENV=py35-pytest29 + - TOXENV=py27-pytest28-pexpect + - TOXENV=py35-pytest28-pexpect + - TOXENV=flakes + - TOXENV=readme + +script: tox notifications: irc: channels: diff --git a/appveyor.yml b/appveyor.yml index 6c5f28a..f76bf6d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,26 @@ +environment: + matrix: + # note: please use "tox --listenvs" to populate the build matrix + - TOXENV: "py26-pytest27" + - TOXENV: "py26-pytest28" + - TOXENV: "py26-pytest29" + - TOXENV: "py26-pytest30" + - TOXENV: "py27-pytest27" + - TOXENV: "py27-pytest28" + - TOXENV: "py27-pytest29" + - TOXENV: "py27-pytest30" + - TOXENV: "py34-pytest27" + - TOXENV: "py34-pytest28" + - TOXENV: "py34-pytest29" + - TOXENV: "py34-pytest30" + - TOXENV: "py35-pytest27" + - TOXENV: "py35-pytest28" + - TOXENV: "py35-pytest29" + - TOXENV: "py27-pytest28-pexpect" + - TOXENV: "py35-pytest28-pexpect" + - TOXENV: "flakes" + - TOXENV: "readme" + install: - C:\Python35\python -m pip install tox setuptools_scm diff --git a/setup.py b/setup.py index 34c91f6..125a8f0 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( ], }, zip_safe=False, - install_requires=['execnet>=1.1', 'pytest>=2.4.2', 'py>=1.4.22'], + install_requires=['execnet>=1.1', 'pytest>=2.7.0', 'py>=1.4.22'], setup_requires=['setuptools_scm'], classifiers=[ 'Development Status :: 5 - Production/Stable', diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 21dfd71..2bb7bb1 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -62,7 +62,7 @@ class TestDistribution: pass """) result = testdir.runpytest(p1, '--tx=popen', '--tx=popen') - assert result.ret == 1 + assert result.ret in (1, 2) result.stdout.fnmatch_lines([ "E ImportError: *__import_of_missing_module*", ]) diff --git a/tox.ini b/tox.ini index 7095101..e40ff80 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,7 @@ [tox] # if you change the envlist, please update .travis.yml file as well envlist= - py{26,27,34}-pytest2{6,7,8,9} - py35-pytest2{7,8,9} + py{26,27,34,35}-pytest{27,28,29,30} py{27,35}-pytest28-pexpect flakes readme @@ -15,10 +14,10 @@ deps = pycmd # to avoid .eggs setuptools_scm - pytest26: pytest~=2.6.1 pytest27: pytest~=2.7.2 pytest28: pytest~=2.8.7 - pytest29: pytest~=2.9.1 + pytest29: pytest~=2.9.2 + pytest30: pytest~=3.0.5 pexpect: pexpect platform= pexpect: linux|darwin