mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-03 16:39:25 +01:00
Fixed Babelfish so that tests run.
This commit is contained in:
parent
850f457bf6
commit
f5e4e64815
@ -30,6 +30,8 @@
|
||||
import supybot.conf as conf
|
||||
import supybot.registry as registry
|
||||
|
||||
import babelfish
|
||||
|
||||
def configure(advanced):
|
||||
# This will be called by supybot to configure this module. advanced is
|
||||
# a bool that specifies whether the user identified himself as an advanced
|
||||
@ -44,7 +46,7 @@ class Languages(registry.OnlySomeStrings):
|
||||
normalize = staticmethod(str.capitalize)
|
||||
|
||||
class SpaceSeparatedListOfLanguages(registry.SeparatedListOf):
|
||||
List = sets.Set
|
||||
List = set
|
||||
Value = Languages
|
||||
def splitter(self, s):
|
||||
return s.split()
|
||||
|
@ -43,7 +43,7 @@ import supybot.callbacks as callbacks
|
||||
|
||||
class Babelfish(callbacks.Privmsg):
|
||||
threaded = True
|
||||
_abbrevs = utils.abbrev(imap(str.lower, babelfish.available_languages))
|
||||
_abbrevs = utils.abbrev(map(str.lower, babelfish.available_languages))
|
||||
_abbrevs['de'] = 'german'
|
||||
_abbrevs['jp'] = 'japanese'
|
||||
_abbrevs['kr'] = 'korean'
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
from supybot.test import *
|
||||
|
||||
class BabelFishTestCase(PluginTestCase, PluginDocumentation):
|
||||
class BabelFishTestCase(PluginTestCase):
|
||||
plugins = ('Babelfish',)
|
||||
if network:
|
||||
def testTranslate(self):
|
||||
|
Loading…
Reference in New Issue
Block a user