def _getsessionclass(self): |
""" return Session class determined from cmdline options |
and looked up in initial config modules. |
""" |
if self.option.session is not None: |
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) |