Merge pull request #1006 from hpk42/pytest-2.7

some fixes, streamlines to get 2.7.3 out the door
This commit is contained in:
Floris Bruynooghe 2015-09-15 11:37:38 +01:00
commit b4c47c0ac0
4 changed files with 16 additions and 7 deletions

View File

@ -1,2 +1,2 @@
#
__version__ = '2.7.2'
__version__ = '2.7.3'

View File

@ -3,8 +3,6 @@ import bdb
import sys
from time import time
from pkg_resources import parse_version
import py
import pytest
from py._code.code import TerminalRepr
@ -496,7 +494,14 @@ def importorskip(modname, minversion=None):
if minversion is None:
return mod
verattr = getattr(mod, '__version__', None)
if verattr is None or parse_version(verattr) < parse_version(minversion):
skip("module %r has __version__ %r, required is: %r" %(
modname, verattr, minversion))
if minversion is not None:
try:
from pkg_resources import parse_version as pv
except ImportError:
skip("we have a required version for %r but can not import "
"no pkg_resources to parse version strings." %(modname,))
if verattr is None or pv(verattr) < pv(minversion):
skip("module %r has __version__ %r, required is: %r" %(
modname, verattr, minversion))
return mod

View File

@ -8,3 +8,7 @@ upload-dir = doc/en/build/html
[bdist_wheel]
universal = 1
[devpi:upload]
formats=sdist.tgz,bdist_wheel

View File

@ -293,7 +293,7 @@ class TestExecutionForked(BaseFunctionalTests):
def getrunner(self):
# XXX re-arrange this test to live in pytest-xdist
xplugin = pytest.importorskip("xdist.plugin")
xplugin = pytest.importorskip("xdist.boxed")
return xplugin.forked_run_report
def test_suicide(self, testdir):