[svn r38506] config.getvalue_pathlist should also honour option values
(to be uniform with getvalue semantics) --HG-- branch : trunk
This commit is contained in:
parent
7973f472d7
commit
ff9df3c079
|
@ -90,6 +90,9 @@ class Config(object):
|
|||
objects (they can be relative to the location
|
||||
where they were found).
|
||||
"""
|
||||
try:
|
||||
return getattr(self.option, name)
|
||||
except AttributeError:
|
||||
try:
|
||||
mod, relroots = self.conftest.rget_with_confmod(name, path)
|
||||
except KeyError:
|
||||
|
|
|
@ -289,6 +289,10 @@ class TestSessionAndOptions:
|
|||
assert pl[0] == tmpdir
|
||||
assert pl[1] == somepath
|
||||
|
||||
config.option.mypathlist = [py.path.local()]
|
||||
pl = config.getvalue_pathlist('mypathlist')
|
||||
assert pl == [py.path.local()]
|
||||
|
||||
def test_config_iocapturing(self):
|
||||
self.tmpdir
|
||||
config = py.test.config._reparse([self.tmpdir])
|
||||
|
|
Loading…
Reference in New Issue