mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Add the i18n test in src/test.py
This commit is contained in:
parent
0360451cb9
commit
283a026449
@ -37,6 +37,7 @@ import unittest
|
||||
import threading
|
||||
|
||||
import supybot.log as log
|
||||
import supybot.i18n as i18n
|
||||
import supybot.conf as conf
|
||||
import supybot.utils as utils
|
||||
import supybot.ircdb as ircdb
|
||||
@ -359,6 +360,7 @@ class PluginTestCase(SupyTestCase):
|
||||
return
|
||||
for cb in self.irc.callbacks:
|
||||
name = cb.name()
|
||||
print " --- " + name
|
||||
if ((name in self._noTestDoc) and \
|
||||
not name.lower() in self.__class__.__name__.lower()):
|
||||
continue
|
||||
@ -370,6 +372,13 @@ class PluginTestCase(SupyTestCase):
|
||||
attr == callbacks.canonicalName(attr):
|
||||
self.failUnless(getattr(cb, attr, None).__doc__,
|
||||
'%s.%s has no help.' % (name, attr))
|
||||
def testInternationalization(self):
|
||||
name = self.__class__.__module__[0:-len('.test')]
|
||||
if self.__class__.__module__.startswith('supybot'):
|
||||
return
|
||||
self.failIf(hasattr(sys.modules[name], '_') == False,
|
||||
'%s has no internationalizer.' % name)
|
||||
|
||||
|
||||
|
||||
class ChannelPluginTestCase(PluginTestCase):
|
||||
|
Loading…
Reference in New Issue
Block a user