- make sure sub pytest runs use the same basetemp
- depend on pluggy < 0.3 --HG-- branch : pluggy1
This commit is contained in:
parent
bddc88f09e
commit
bb8141e27c
|
@ -1,2 +1,2 @@
|
||||||
#
|
#
|
||||||
__version__ = '2.8.0.dev2'
|
__version__ = '2.8.0.dev3'
|
||||||
|
|
|
@ -712,8 +712,20 @@ class Testdir:
|
||||||
option "--runpytest" and return a :py:class:`RunResult`.
|
option "--runpytest" and return a :py:class:`RunResult`.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
args = self._ensure_basetemp(args)
|
||||||
return self._runpytest_method(*args, **kwargs)
|
return self._runpytest_method(*args, **kwargs)
|
||||||
|
|
||||||
|
def _ensure_basetemp(self, args):
|
||||||
|
args = [str(x) for x in args]
|
||||||
|
for x in args:
|
||||||
|
if str(x).startswith('--basetemp'):
|
||||||
|
#print ("basedtemp exists: %s" %(args,))
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
args.append("--basetemp=%s" % self.tmpdir.dirpath('basetemp'))
|
||||||
|
#print ("added basetemp: %s" %(args,))
|
||||||
|
return args
|
||||||
|
|
||||||
def parseconfig(self, *args):
|
def parseconfig(self, *args):
|
||||||
"""Return a new py.test Config instance from given commandline args.
|
"""Return a new py.test Config instance from given commandline args.
|
||||||
|
|
||||||
|
@ -726,12 +738,8 @@ class Testdir:
|
||||||
modules which will be registered with the PluginManager.
|
modules which will be registered with the PluginManager.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
args = [str(x) for x in args]
|
args = self._ensure_basetemp(args)
|
||||||
for x in args:
|
|
||||||
if str(x).startswith('--basetemp'):
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
args.append("--basetemp=%s" % self.tmpdir.dirpath('basetemp'))
|
|
||||||
import _pytest.config
|
import _pytest.config
|
||||||
config = _pytest.config._prepareconfig(args, self.plugins)
|
config = _pytest.config._prepareconfig(args, self.plugins)
|
||||||
# we don't know what the test will do with this half-setup config
|
# we don't know what the test will do with this half-setup config
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -48,7 +48,7 @@ def has_environment_marker_support():
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
install_requires = ['py>=1.4.27.dev2', 'pluggy>=0.1.0,<1.0.0']
|
install_requires = ['py>=1.4.27.dev2', 'pluggy>=0.2.0,<0.3.0']
|
||||||
extras_require = {}
|
extras_require = {}
|
||||||
if has_environment_marker_support():
|
if has_environment_marker_support():
|
||||||
extras_require[':python_version=="2.6" or python_version=="3.0" or python_version=="3.1"'] = ['argparse']
|
extras_require[':python_version=="2.6" or python_version=="3.0" or python_version=="3.1"'] = ['argparse']
|
||||||
|
|
Loading…
Reference in New Issue