finish pytest-2.7.2 release

This commit is contained in:
holger krekel 2015-06-23 16:31:24 +02:00
parent 53021ea264
commit e84c00efae
3 changed files with 85 additions and 50 deletions

View File

@ -0,0 +1,58 @@
pytest-2.7.2: bug fixes
=======================
pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms.
This release is supposed to be drop-in compatible to 2.7.1.
See below for the changes and see docs at:
http://pytest.org
As usual, you can upgrade from pypi via::
pip install -U pytest
Thanks to all who contributed to this release, among them:
Bruno Oliveira
Floris Bruynooghe
Punyashloka Biswal
Aron Curzon
Benjamin Peterson
Thomas De Schampheleire
Edison Gustavo Muenz
Holger Krekel
Happy testing,
The py.test Development Team
2.7.2 (compared to 2.7.1)
-----------------------------
- fix issue767: pytest.raises value attribute does not contain the exception
instance on Python 2.6. Thanks Eric Siegerman for providing the test
case and Bruno Oliveira for PR.
- Automatically create directory for junitxml and results log.
Thanks Aron Curzon.
- fix issue713: JUnit XML reports for doctest failures.
Thanks Punyashloka Biswal.
- fix issue735: assertion failures on debug versions of Python 3.4+
Thanks Benjamin Peterson.
- fix issue114: skipif marker reports to internal skipping plugin;
Thanks Floris Bruynooghe for reporting and Bruno Oliveira for the PR.
- fix issue748: unittest.SkipTest reports to internal pytest unittest plugin.
Thanks Thomas De Schampheleire for reporting and Bruno Oliveira for the PR.
- fix issue718: failed to create representation of sets containing unsortable
elements in python 2. Thanks Edison Gustavo Muenz
- fix issue756, fix issue752 (and similar issues): depend on py-1.4.29
which has a refined algorithm for traceback generation.

View File

@ -3,17 +3,19 @@ import sys
pytest_plugins = "pytester",
import os, py
import os, py, gc
class LsofFdLeakChecker(object):
def get_open_files(self):
gc.collect()
out = self._exec_lsof()
open_files = self._parse_lsof_output(out)
return open_files
def _exec_lsof(self):
pid = os.getpid()
return py.process.cmdexec("lsof -Ffn0 -p %d" % pid)
#return py.process.cmdexec("lsof -Ffn0 -p %d" % pid)
return py.process.cmdexec("lsof -p %d" % pid)
def _parse_lsof_output(self, out):
def isopen(line):

71
tox.ini
View File

@ -1,84 +1,71 @@
[tox]
minversion=2.0
distshare={homedir}/.tox/distshare
envlist=flakes,py26,py27,py34,pypy,py27-pexpect,py33-pexpect,py27-nobyte,py33,py27-xdist,py33-xdist,py27-trial,py33-trial,doctesting,py27-cxfreeze
envlist=
flakes,py26,py27,py33,py34,pypy,
{py27,py34}-{pexpect,xdist,trial},
py27-nobyte,doctesting,py27-cxfreeze
[testenv]
changedir=testing
commands= py.test --lsof -rfsxX --junitxml={envlogdir}/junit-{envname}.xml []
commands= py.test --lsof -rfsxX {posargs:testing}
deps=
nose
mock
[testenv:genscript]
changedir=.
commands= py.test --genscript=pytest1
[testenv:flakes]
changedir=
deps = pytest-flakes>=0.2
commands = py.test --flakes -m flakes _pytest testing
[testenv:py27-xdist]
changedir=.
basepython=python2.7
deps=pytest-xdist
mock
nose
commands=
py.test -n1 -rfsxX \
--junitxml={envlogdir}/junit-{envname}.xml {posargs:testing}
py.test -n1 -rfsxX {posargs:testing}
[testenv:py33-xdist]
changedir=.
basepython=python3.3
[testenv:py34-xdist]
deps={[testenv:py27-xdist]deps}
commands=
py.test -n3 -rfsxX \
--junitxml={envlogdir}/junit-{envname}.xml testing
py.test -n3 -rfsxX testing
[testenv:py27-pexpect]
changedir=testing
basepython=python2.7
platform=linux|darwin
deps=pexpect
commands=
py.test -rfsxX test_pdb.py test_terminal.py test_unittest.py
[testenv:py33-pexpect]
[testenv:py34-pexpect]
changedir=testing
basepython=python3.3
platform=linux|darwin
deps={[testenv:py27-pexpect]deps}
commands=
py.test -rfsxX test_pdb.py test_terminal.py test_unittest.py
[testenv:py27-nobyte]
changedir=.
basepython=python2.7
deps=pytest-xdist
distribute=true
setenv=
PYTHONDONTWRITEBYTECODE=1
commands=
py.test -n3 -rfsxX \
--junitxml={envlogdir}/junit-{envname}.xml {posargs:testing}
py.test -n3 -rfsxX {posargs:testing}
[testenv:py27-trial]
changedir=.
basepython=python2.7
deps=twisted
commands=
py.test -rsxf \
--junitxml={envlogdir}/junit-{envname}.xml {posargs:testing/test_unittest.py}
py.test -rsxf {posargs:testing/test_unittest.py}
[testenv:py33-trial]
changedir=.
basepython=python3.3
[testenv:py34-trial]
# py34-trial does not work
platform=linux|darwin
deps={[testenv:py27-trial]deps}
commands=
py.test -rsxf \
--junitxml={envlogdir}/junit-{envname}.xml {posargs:testing/test_unittest.py}
py.test -rsxf {posargs:testing/test_unittest.py}
[testenv:doctest]
changedir=.
commands=py.test --doctest-modules _pytest
deps=
@ -94,13 +81,11 @@ commands=
make html
[testenv:doctesting]
basepython=python3.3
changedir=doc/en
deps=PyYAML
commands= py.test -rfsxX --junitxml={envlogdir}/junit-{envname}.xml []
commands= py.test -rfsxX {posargs}
[testenv:regen]
basepython=python3.4
changedir=doc/en
deps=sphinx
PyYAML
@ -109,32 +94,22 @@ commands=
#pip install pytest==2.3.4
make regen
[testenv:py31]
deps=nose>=1.0
[testenv:py31-xdist]
deps=pytest-xdist
commands=
py.test -n3 -rfsxX \
--junitxml={envlogdir}/junit-{envname}.xml []
[testenv:jython]
changedir=testing
commands=
{envpython} {envbindir}/py.test-jython \
-rfsxX --junitxml={envlogdir}/junit-{envname}2.xml []
{envpython} {envbindir}/py.test-jython -rfsxX {posargs}
[testenv:py27-cxfreeze]
changedir=testing/cx_freeze
basepython=python2.7
platform=linux|darwin
commands=
{envpython} install_cx_freeze.py
{envpython} runtests_setup.py build --build-exe build
{envpython} tox_run.py
[testenv:coveralls]
changedir=testing
basepython=python3.4
deps =
{[testenv]deps}
coveralls
@ -154,4 +129,4 @@ python_files=test_*.py *_test.py testing/*/*.py
python_classes=Test Acceptance
python_functions=test
pep8ignore = E401 E225 E261 E128 E124 E302
norecursedirs = .tox ja .hg
norecursedirs = .tox ja .hg cx_freeze_source