Handled deprecation in tests.

This commit is contained in:
Jeremy Fincher 2004-01-15 14:38:17 +00:00
parent 942d67cc21
commit 19a63ef669
2 changed files with 9 additions and 2 deletions

View File

@ -212,7 +212,10 @@ class TestCase:
testMethod = getattr(self, self.__testMethodName) testMethod = getattr(self, self.__testMethodName)
try: try:
try: try:
self.setUp() x = self.setUp()
if x:
print 'skipped (%s)' % x
return
except KeyboardInterrupt: except KeyboardInterrupt:
raise raise
except: except:

View File

@ -40,6 +40,7 @@ started = time.time()
import unittest import unittest
import conf import conf
import utils
import ircdb import ircdb
import world import world
world.startedAt = started world.startedAt = started
@ -138,7 +139,10 @@ class PluginTestCase(unittest.TestCase):
else: else:
for name in self.plugins: for name in self.plugins:
if name not in ('Owner', 'Misc'): if name not in ('Owner', 'Misc'):
try:
module = Owner.loadPluginModule(name) module = Owner.loadPluginModule(name)
except Owner.Deprecated, e:
return utils.exnToString(e)
cb = Owner.loadPluginClass(self.irc, module) cb = Owner.loadPluginClass(self.irc, module)
def tearDown(self): def tearDown(self):