[svn r38249] It seems that there was somehow different idea in mind, but I actually

do not get it.

Right now there is no way to override default session other than
from py.__.test import config; config.TerminalSession = 'name_to_import'
which is scary. Holger please take a look.

--HG--
branch : trunk
This commit is contained in:
fijal 2007-02-09 14:24:08 +01:00
parent 73281adc5a
commit aa4896fa04
1 changed files with 4 additions and 0 deletions

View File

@ -146,6 +146,10 @@ class Config(object):
return self.conftest.rget(self.option.session)
else:
name = self._getsessionname()
try:
return self.conftest.rget(name)
except KeyError:
pass
importpath = globals()[name]
mod = __import__(importpath, None, None, '__doc__')
return getattr(mod, name)