make getvalueorskip() be hidden in skip-reporting. also bump version.
This commit is contained in:
parent
7db9e98b55
commit
9ab256c296
|
@ -399,7 +399,9 @@ class Config(object):
|
|||
return self._getconftest(name, path, check=False)
|
||||
|
||||
def getvalueorskip(self, name, path=None):
|
||||
""" (deprecated) return getvalue(name) or call py.test.skip if no value exists. """
|
||||
""" (deprecated) return getvalue(name) or call
|
||||
py.test.skip if no value exists. """
|
||||
__tracebackhide__ = True
|
||||
try:
|
||||
val = self.getvalue(name, path)
|
||||
if val is None:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"""
|
||||
unit and functional testing with Python.
|
||||
"""
|
||||
__version__ = '2.0.1.dev3'
|
||||
__version__ = '2.0.1.dev4'
|
||||
__all__ = ['main']
|
||||
|
||||
from _pytest.core import main, UsageError, _preloadplugins
|
||||
|
|
2
setup.py
2
setup.py
|
@ -22,7 +22,7 @@ def main():
|
|||
name='pytest',
|
||||
description='py.test: simple powerful testing with Python',
|
||||
long_description = long_description,
|
||||
version='2.0.1.dev3',
|
||||
version='2.0.1.dev4',
|
||||
url='http://pytest.org',
|
||||
license='MIT license',
|
||||
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
||||
|
|
|
@ -111,8 +111,15 @@ class TestConfigAPI:
|
|||
verbose = config.getvalueorskip("verbose")
|
||||
assert verbose == config.option.verbose
|
||||
config.option.hello = None
|
||||
pytest.raises(pytest.skip.Exception,
|
||||
"config.getvalueorskip('hello')")
|
||||
try:
|
||||
config.getvalueorskip('hello')
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except:
|
||||
excinfo = py.code.ExceptionInfo()
|
||||
frame = excinfo.traceback[-2].frame
|
||||
assert frame.code.name == "getvalueorskip"
|
||||
assert frame.eval("__tracebackhide__")
|
||||
|
||||
def test_config_overwrite(self, testdir):
|
||||
o = testdir.tmpdir
|
||||
|
|
Loading…
Reference in New Issue