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

Method testCosh

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

Source from the content-addressed store, hash-verified

474 @unittest.skipIf(sys.platform == 'win32' and platform.machine() in ('ARM', 'ARM64'),
475 "Windows UCRT is off by 2 ULP this test requires accuracy within 1 ULP")
476 def testCosh(self):
477 self.assertRaises(TypeError, math.cosh)
478 self.ftest('cosh(0)', math.cosh(0), 1)
479 self.ftest('cosh(2)-2*cosh(1)**2', math.cosh(2)-2*math.cosh(1)**2, -1) # Thanks to Lambert
480 self.assertEqual(math.cosh(INF), INF)
481 self.assertEqual(math.cosh(NINF), INF)
482 self.assertTrue(math.isnan(math.cosh(NAN)))
483
484 def testDegrees(self):
485 self.assertRaises(TypeError, math.degrees)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected