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)
try:
try:
self.setUp()
x = self.setUp()
if x:
print 'skipped (%s)' % x
return
except KeyboardInterrupt:
raise
except:

View File

@ -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'):
try:
module = Owner.loadPluginModule(name)
except Owner.Deprecated, e:
return utils.exnToString(e)
cb = Owner.loadPluginClass(self.irc, module)
def tearDown(self):