From 82044fd8737510de3dda04ecce95ad5cd15d5698 Mon Sep 17 00:00:00 2001 From: hpk Date: Fri, 27 Feb 2009 16:46:00 +0100 Subject: [PATCH] [svn r62245] fixed more wrong renames, fine-tuning --HG-- branch : trunk --- py/test/config.py | 10 ++++------ py/test/looponfail/remote.py | 3 +-- py/test/pytestplugin.py | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/py/test/config.py b/py/test/config.py index 7e61fd3ac..5f0f4cd6c 100644 --- a/py/test/config.py +++ b/py/test/config.py @@ -1,5 +1,3 @@ -from __future__ import generators - import py from conftesthandle import Conftest @@ -159,19 +157,19 @@ class Config(object): def initsession(self): """ return an initialized session object. """ - cls = self._getestdirclass() + cls = self._getsessionclass() session = cls(self) session.fixoptions() return session - def _getestdirclass(self): + 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._getestdirname() + name = self._getsessionname() try: return self._conftest.rget(name) except KeyError: @@ -180,7 +178,7 @@ class Config(object): mod = __import__(importpath, None, None, '__doc__') return getattr(mod, name) - def _getestdirname(self): + def _getsessionname(self): """ return default session name as determined from options. """ if self.option.collectonly: name = 'Session' diff --git a/py/test/looponfail/remote.py b/py/test/looponfail/remote.py index 8308f20f1..39172b3e9 100644 --- a/py/test/looponfail/remote.py +++ b/py/test/looponfail/remote.py @@ -31,11 +31,10 @@ class LooponfailingSession(Session): while 1: self.loop_once(loopstate) if not loopstate.colitems and loopstate.wasfailing: - continue # rerun immediately + continue # the last failures passed, let's rerun all self.statrecorder.waitonchange(checkinterval=2.0) except KeyboardInterrupt: print - pass def loop_once(self, loopstate): colitems = loopstate.colitems diff --git a/py/test/pytestplugin.py b/py/test/pytestplugin.py index 1a9dc16c7..3ff3a9d20 100644 --- a/py/test/pytestplugin.py +++ b/py/test/pytestplugin.py @@ -120,4 +120,4 @@ def importplugin(importspec): try: return __import__("py.__.test.plugin.%s" %(importspec), None, None, '__doc__') except ImportError: - raise ImportError(importspec) + return __import__(importspec) # show the original exception