parent
20222ec57b
commit
216919d612
|
@ -122,7 +122,7 @@ class Config(object):
|
||||||
""" same as previous, but returns conftest's path
|
""" same as previous, but returns conftest's path
|
||||||
as well
|
as well
|
||||||
"""
|
"""
|
||||||
val, mod = self.conftest.rget_path(name, path)
|
val, mod = self.conftest.rget_with_confmod(name, path)
|
||||||
return val, py.path.local(mod.__file__).dirpath()
|
return val, py.path.local(mod.__file__).dirpath()
|
||||||
|
|
||||||
def initsession(self):
|
def initsession(self):
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Conftest(object):
|
||||||
modules.reverse()
|
modules.reverse()
|
||||||
return self._get(name, modules)
|
return self._get(name, modules)
|
||||||
|
|
||||||
def rget_path(self, name, path=None):
|
def rget_with_confmod(self, name, path=None):
|
||||||
return self._rget(name, path)
|
return self._rget(name, path)
|
||||||
|
|
||||||
def _get(self, name, modules):
|
def _get(self, name, modules):
|
||||||
|
|
|
@ -68,7 +68,7 @@ class TestConftestValueAccessGlobal:
|
||||||
def test_value_access_path(self):
|
def test_value_access_path(self):
|
||||||
topdir = self.basedir.join("adir", "b")
|
topdir = self.basedir.join("adir", "b")
|
||||||
conftest = Conftest(topdir)
|
conftest = Conftest(topdir)
|
||||||
_, mod = conftest.rget_path("a")
|
_, mod = conftest.rget_with_confmod("a")
|
||||||
assert py.path.local(mod.__file__).dirpath() == topdir
|
assert py.path.local(mod.__file__).dirpath() == topdir
|
||||||
|
|
||||||
class TestConftestValueAccessInPackage(TestConftestValueAccessGlobal):
|
class TestConftestValueAccessInPackage(TestConftestValueAccessGlobal):
|
||||||
|
|
Loading…
Reference in New Issue