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

Method testCosh

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

Source from the content-addressed store, hash-verified

492 @unittest.skipIf(sys.platform == 'win32' and platform.machine() in ('ARM', 'ARM64'),
493 "Windows UCRT is off by 2 ULP this test requires accuracy within 1 ULP")
494 def testCosh(self):
495 self.assertRaises(TypeError, math.cosh)
496 self.ftest('cosh(0)', math.cosh(0), 1)
497 self.ftest('cosh(2)-2*cosh(1)**2', math.cosh(2)-2*math.cosh(1)**2, -1) # Thanks to Lambert
498 self.assertEqual(math.cosh(INF), INF)
499 self.assertEqual(math.cosh(NINF), INF)
500 self.assertTrue(math.isnan(math.cosh(NAN)))
501
502 def testDegrees(self):
503 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