Test using pytest 3.0

Fix #99
This commit is contained in:
Bruno Oliveira
2016-12-05 19:59:19 -02:00
parent 780cd0e04f
commit e5d8064534
5 changed files with 50 additions and 26 deletions

View File

@@ -5,26 +5,28 @@ python:
install: pip install -U tox setuptools_scm install: pip install -U tox setuptools_scm
env: env:
matrix: matrix:
- TESTENV=py26-pytest26 # note: please use "tox --listenvs" to populate the build matrix
- TESTENV=py26-pytest27 - TOXENV=py26-pytest27
- TESTENV=py26-pytest28 - TOXENV=py26-pytest28
- TESTENV=py26-pytest29 - TOXENV=py26-pytest29
- TESTENV=py27-pytest26 - TOXENV=py26-pytest30
- TESTENV=py27-pytest27 - TOXENV=py27-pytest27
- TESTENV=py27-pytest28 - TOXENV=py27-pytest28
- TESTENV=py27-pytest29 - TOXENV=py27-pytest29
- TESTENV=py34-pytest26 - TOXENV=py27-pytest30
- TESTENV=py34-pytest27 - TOXENV=py34-pytest27
- TESTENV=py34-pytest28 - TOXENV=py34-pytest28
- TESTENV=py34-pytest29 - TOXENV=py34-pytest29
- TESTENV=py35-pytest27 - TOXENV=py34-pytest30
- TESTENV=py35-pytest28 - TOXENV=py35-pytest27
- TESTENV=py35-pytest29 - TOXENV=py35-pytest28
- TESTENV=py27-pytest28-pexpect - TOXENV=py35-pytest29
- TESTENV=py35-pytest28-pexpect - TOXENV=py27-pytest28-pexpect
- TESTENV=flakes - TOXENV=py35-pytest28-pexpect
- TESTENV=readme - TOXENV=flakes
script: tox --recreate -e $TESTENV - TOXENV=readme
script: tox
notifications: notifications:
irc: irc:
channels: channels:

View File

@@ -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: install:
- C:\Python35\python -m pip install tox setuptools_scm - C:\Python35\python -m pip install tox setuptools_scm

View File

@@ -20,7 +20,7 @@ setup(
], ],
}, },
zip_safe=False, 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'], setup_requires=['setuptools_scm'],
classifiers=[ classifiers=[
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',

View File

@@ -62,7 +62,7 @@ class TestDistribution:
pass pass
""") """)
result = testdir.runpytest(p1, '--tx=popen', '--tx=popen') result = testdir.runpytest(p1, '--tx=popen', '--tx=popen')
assert result.ret == 1 assert result.ret in (1, 2)
result.stdout.fnmatch_lines([ result.stdout.fnmatch_lines([
"E ImportError: *__import_of_missing_module*", "E ImportError: *__import_of_missing_module*",
]) ])

View File

@@ -1,8 +1,7 @@
[tox] [tox]
# if you change the envlist, please update .travis.yml file as well # if you change the envlist, please update .travis.yml file as well
envlist= envlist=
py{26,27,34}-pytest2{6,7,8,9} py{26,27,34,35}-pytest{27,28,29,30}
py35-pytest2{7,8,9}
py{27,35}-pytest28-pexpect py{27,35}-pytest28-pexpect
flakes flakes
readme readme
@@ -15,10 +14,10 @@ deps =
pycmd pycmd
# to avoid .eggs # to avoid .eggs
setuptools_scm setuptools_scm
pytest26: pytest~=2.6.1
pytest27: pytest~=2.7.2 pytest27: pytest~=2.7.2
pytest28: pytest~=2.8.7 pytest28: pytest~=2.8.7
pytest29: pytest~=2.9.1 pytest29: pytest~=2.9.2
pytest30: pytest~=3.0.5
pexpect: pexpect pexpect: pexpect
platform= platform=
pexpect: linux|darwin pexpect: linux|darwin