.c bugfix
parent
f49a1a6eab
commit
1cd247e356
|
@ -22,7 +22,7 @@ subs = [
|
||||||
]
|
]
|
||||||
|
|
||||||
r_google_calc = re.compile(r'calculator-40.gif.*? = (.*?)<')
|
r_google_calc = re.compile(r'calculator-40.gif.*? = (.*?)<')
|
||||||
r_google_calc_exp = re.compile(r'calculator-40.gif.*? = (.*?)<sup>(.*?)<')
|
r_google_calc_exp = re.compile(r'calculator-40.gif.*? = (.*?)<sup>(.*?)</sup></h2>')
|
||||||
|
|
||||||
def c(phenny, input):
|
def c(phenny, input):
|
||||||
"""Google calculator."""
|
"""Google calculator."""
|
||||||
|
|
|
@ -36,3 +36,9 @@ class TestCalc(unittest.TestCase):
|
||||||
c(self.phenny, input)
|
c(self.phenny, input)
|
||||||
|
|
||||||
self.phenny.reply.assert_called_once_with('Sorry, no result.')
|
self.phenny.reply.assert_called_once_with('Sorry, no result.')
|
||||||
|
|
||||||
|
def test_c_quirk(self):
|
||||||
|
input = Mock(group=lambda x: '24/50')
|
||||||
|
c(self.phenny, input)
|
||||||
|
|
||||||
|
self.phenny.say.assert_called_once_with('0.48')
|
||||||
|
|
Loading…
Reference in New Issue