mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Handled deprecation in tests.
This commit is contained in:
parent
942d67cc21
commit
19a63ef669
@ -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:
|
||||||
|
@ -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'):
|
||||||
module = Owner.loadPluginModule(name)
|
try:
|
||||||
|
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):
|
||||||
|
Loading…
Reference in New Issue
Block a user