mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Fix for bug #842414.
This commit is contained in:
parent
27ce432b64
commit
320d6b003c
@ -94,7 +94,7 @@ class Math(callbacks.Privmsg):
|
||||
if imag == 0:
|
||||
return str(real)
|
||||
elif imag == 1:
|
||||
imag = 'i'
|
||||
imag = '+i'
|
||||
elif imag == -1:
|
||||
imag = '-i'
|
||||
elif imag < 0:
|
||||
|
@ -49,6 +49,9 @@ class MathTestCase(PluginTestCase, PluginDocumentation):
|
||||
|
||||
def testCalcNoNameError(self):
|
||||
self.assertNotRegexp('calc foobar(x)', 'NameError')
|
||||
|
||||
def testCalcImaginary(self):
|
||||
self.assertResponse('calc 3 + sqrt(-1)', '3+i')
|
||||
|
||||
def testRpn(self):
|
||||
self.assertResponse('rpn 5 2 +', '7')
|
||||
|
Loading…
Reference in New Issue
Block a user