mirror of https://github.com/Mikaela/Limnoria.git
Math: Skip tests of negative integers exponentiation on Python 2.
This commit is contained in:
parent
3cc52aefca
commit
ee4690ea18
|
@ -98,8 +98,10 @@ class MathTestCase(PluginTestCase):
|
|||
def testCalc(self):
|
||||
self.assertResponse('calc 5*0.06', str(5*0.06))
|
||||
self.assertResponse('calc 2.0-7.0', str(2-7))
|
||||
self.assertResponse('calc (-1)**.5', 'i')
|
||||
self.assertResponse('calc e**(i*pi)+1', '0')
|
||||
if sys.version_info[0] >= 3:
|
||||
# Python 2 has bad handling of exponentiation of negative numbers
|
||||
self.assertResponse('calc (-1)**.5', 'i')
|
||||
self.assertRegexp('calc (-5)**.5', '2.236067977[0-9]+i')
|
||||
self.assertRegexp('calc -((-5)**.5)', '-2.236067977[0-9]+i')
|
||||
self.assertNotRegexp('calc [9, 5] + [9, 10]', 'TypeError')
|
||||
|
|
Loading…
Reference in New Issue