Math: Fix tests to allow higher precision.

This commit is contained in:
Valentin Lorentz 2013-01-11 18:15:02 +01:00
parent ea63da3e7d
commit 0ff58db4f0

View File

@ -100,8 +100,8 @@ class MathTestCase(PluginTestCase):
self.assertResponse('calc 2.0-7.0', str(2-7))
self.assertResponse('calc (-1)**.5', 'i')
self.assertResponse('calc e**(i*pi)+1', '0')
self.assertResponse('calc (-5)**.5', '2.2360679775i')
self.assertResponse('calc -((-5)**.5)', '-2.2360679775i')
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')
self.assertError('calc [9, 5] + [9, 10]')
self.assertNotError('calc degrees(2)')