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

Method testAtanh

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

Source from the content-addressed store, hash-verified

281 self.assertTrue(math.isnan(math.atan(NAN)))
282
283 def testAtanh(self):
284 self.assertRaises(TypeError, math.atan)
285 self.ftest('atanh(0)', math.atanh(0), 0)
286 self.ftest('atanh(0.5)', math.atanh(0.5), 0.54930614433405489)
287 self.ftest('atanh(-0.5)', math.atanh(-0.5), -0.54930614433405489)
288 self.assertRaises(ValueError, math.atanh, 1)
289 self.assertRaises(ValueError, math.atanh, -1)
290 self.assertRaises(ValueError, math.atanh, INF)
291 self.assertRaises(ValueError, math.atanh, NINF)
292 self.assertTrue(math.isnan(math.atanh(NAN)))
293
294 @unittest.skipIf(sys.platform.startswith("sunos"),
295 "skipping, see gh-138573")

Callers

nothing calls this directly

Calls 3

ftestMethod · 0.95
assertTrueMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected