From 19a63ef66914765479873c98486385039be9a10f Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 15 Jan 2004 14:38:17 +0000 Subject: [PATCH] Handled deprecation in tests. --- others/unittest.py | 5 ++++- test/testsupport.py | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/others/unittest.py b/others/unittest.py index a2b58c6ad..a9e002e7c 100644 --- a/others/unittest.py +++ b/others/unittest.py @@ -212,7 +212,10 @@ class TestCase: testMethod = getattr(self, self.__testMethodName) try: try: - self.setUp() + x = self.setUp() + if x: + print 'skipped (%s)' % x + return except KeyboardInterrupt: raise except: diff --git a/test/testsupport.py b/test/testsupport.py index 9ca4d9113..728ff7ed5 100644 --- a/test/testsupport.py +++ b/test/testsupport.py @@ -40,6 +40,7 @@ started = time.time() import unittest import conf +import utils import ircdb import world world.startedAt = started @@ -138,7 +139,10 @@ class PluginTestCase(unittest.TestCase): else: for name in self.plugins: if name not in ('Owner', 'Misc'): - module = Owner.loadPluginModule(name) + try: + module = Owner.loadPluginModule(name) + except Owner.Deprecated, e: + return utils.exnToString(e) cb = Owner.loadPluginClass(self.irc, module) def tearDown(self):