mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Fixed some bugs related to the new TestPlugin.
This commit is contained in:
parent
c9360c3990
commit
84e2072903
@ -120,6 +120,7 @@ class TestPlugin(callbacks.Privmsg):
|
|||||||
except Exception, e:
|
except Exception, e:
|
||||||
irc.reply(utils.exnToString(e))
|
irc.reply(utils.exnToString(e))
|
||||||
TestInstance = TestPlugin()
|
TestInstance = TestPlugin()
|
||||||
|
conf.registerPlugin('TestPlugin', True, public=False)
|
||||||
|
|
||||||
class SupyTestCase(unittest.TestCase):
|
class SupyTestCase(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@ -376,12 +377,14 @@ class PluginTestCase(SupyTestCase):
|
|||||||
return self.assertActionRegexp(query, regexp, flags=re.I,
|
return self.assertActionRegexp(query, regexp, flags=re.I,
|
||||||
usePrefixChar=False, **kwargs)
|
usePrefixChar=False, **kwargs)
|
||||||
|
|
||||||
|
_noTestDoc = ('Admin', 'Channel', 'Config',
|
||||||
|
'Misc', 'Owner', 'User', 'TestPlugin')
|
||||||
def testDocumentation(self):
|
def testDocumentation(self):
|
||||||
if self.__class__ in (PluginTestCase, ChannelPluginTestCase):
|
if self.__class__ in (PluginTestCase, ChannelPluginTestCase):
|
||||||
return
|
return
|
||||||
for cb in self.irc.callbacks:
|
for cb in self.irc.callbacks:
|
||||||
name = cb.name()
|
name = cb.name()
|
||||||
if (name in ('Admin', 'Channel', 'Misc', 'Owner', 'User') and \
|
if ((name in self._noTestDoc) and \
|
||||||
not name.lower() in self.__class__.__name__.lower()) or \
|
not name.lower() in self.__class__.__name__.lower()) or \
|
||||||
isinstance(cb, callbacks.PrivmsgRegexp):
|
isinstance(cb, callbacks.PrivmsgRegexp):
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user