mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 19:52:54 +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:
|
||||
|
@ -50,6 +50,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')
|
||||
self.assertResponse('rpn 1 2 3 +', 'Stack: [1, 5]')
|
||||
|
Loading…
Reference in New Issue
Block a user