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:
|
try:
|
||||||
length = int(length)
|
length = int(length)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
irc.error(msg, '%r isn\'t a valid length.')
|
irc.error(msg, '%r isn\'t a valid length.' % length)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
length = 4
|
length = 4
|
||||||
|
@ -42,7 +42,10 @@ class FunTest(PluginTestCase, PluginDocumentation):
|
|||||||
self.assertNotError('lithp meghan sweeney')
|
self.assertNotError('lithp meghan sweeney')
|
||||||
self.assertNotError('objects')
|
self.assertNotError('objects')
|
||||||
self.assertNotError('levenshtein Python Perl')
|
self.assertNotError('levenshtein Python Perl')
|
||||||
|
|
||||||
|
def testSoundex(self):
|
||||||
self.assertNotError('soundex jemfinch')
|
self.assertNotError('soundex jemfinch')
|
||||||
|
self.assertNotRegexp('soundex foobar 3:30', 'ValueError')
|
||||||
|
|
||||||
def testJeffk(self):
|
def testJeffk(self):
|
||||||
for i in range(100):
|
for i in range(100):
|
||||||
|
Loading…
Reference in New Issue
Block a user