MCPcopy Index your code
hub / github.com/RustPython/RustPython / testExp

Method testExp

Lib/test/test_math.py:509–517  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

507 self.ftest('degrees(0)', math.degrees(0), 0)
508
509 def testExp(self):
510 self.assertRaises(TypeError, math.exp)
511 self.ftest('exp(-1)', math.exp(-1), 1/math.e)
512 self.ftest('exp(0)', math.exp(0), 1)
513 self.ftest('exp(1)', math.exp(1), math.e)
514 self.assertEqual(math.exp(INF), INF)
515 self.assertEqual(math.exp(NINF), 0.)
516 self.assertTrue(math.isnan(math.exp(NAN)))
517 self.assertRaises(OverflowError, math.exp, 1000000)
518
519 def testExp2(self):
520 self.assertRaises(TypeError, math.exp2)

Callers

nothing calls this directly

Calls 5

ftestMethod · 0.95
assertTrueMethod · 0.80
assertRaisesMethod · 0.45
expMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected