From aa4896fa0422b3a21a6e078318186212b829e4d5 Mon Sep 17 00:00:00 2001 From: fijal Date: Fri, 9 Feb 2007 14:24:08 +0100 Subject: [PATCH] [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 --- py/test/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/test/config.py b/py/test/config.py index 08ac4057e..a0d757a64 100644 --- a/py/test/config.py +++ b/py/test/config.py @@ -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)