MCPcopy Index your code
hub / github.com/python/cpython / testExp

Method testExp

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

Source from the content-addressed store, hash-verified

489 self.ftest('degrees(0)', math.degrees(0), 0)
490
491 def testExp(self):
492 self.assertRaises(TypeError, math.exp)
493 self.ftest('exp(-1)', math.exp(-1), 1/math.e)
494 self.ftest('exp(0)', math.exp(0), 1)
495 self.ftest('exp(1)', math.exp(1), math.e)
496 self.assertEqual(math.exp(INF), INF)
497 self.assertEqual(math.exp(NINF), 0.)
498 self.assertTrue(math.isnan(math.exp(NAN)))
499 self.assertRaises(OverflowError, math.exp, 1000000)
500
501 def testExp2(self):
502 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