Newer nose deprecated addSkip.

Instead of calling addSkip, the "right" thing to do now is
to inspect the error class and take action based on that.

Change-Id: Ie8e6075c4737c49b5094b65af84b443df523213e
This commit is contained in:
Monty Taylor 2012-06-18 16:48:03 -07:00
parent 7efd611c0e
commit ff5068c353
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import termcolor
from nose import plugins
from nose import suite
from nose import core
from nose import SkipTest
log = logging.getLogger("openstack.nose")
@ -90,6 +91,8 @@ class Openstack(plugins.Plugin):
def _add_error(self, test, err):
if isinstance(test, suite.ContextSuite):
return
if isinstance(err[1], SkipTest):
return self._add_skip(test, err)
name = self._get_name(test)
self.times[name].append(time.time())