mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fixed escaping ValueError in soundex.
This commit is contained in:
parent
9a5cb77fe4
commit
84690d56c9
@ -492,7 +492,7 @@ class Fun(callbacks.Privmsg):
|
||||
try:
|
||||
length = int(length)
|
||||
except ValueError:
|
||||
irc.error(msg, '%r isn\'t a valid length.')
|
||||
irc.error(msg, '%r isn\'t a valid length.' % length)
|
||||
return
|
||||
else:
|
||||
length = 4
|
||||
|
@ -42,7 +42,10 @@ class FunTest(PluginTestCase, PluginDocumentation):
|
||||
self.assertNotError('lithp meghan sweeney')
|
||||
self.assertNotError('objects')
|
||||
self.assertNotError('levenshtein Python Perl')
|
||||
|
||||
def testSoundex(self):
|
||||
self.assertNotError('soundex jemfinch')
|
||||
self.assertNotRegexp('soundex foobar 3:30', 'ValueError')
|
||||
|
||||
def testJeffk(self):
|
||||
for i in range(100):
|
||||
|
Loading…
Reference in New Issue
Block a user