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

Method testAcos

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

Source from the content-addressed store, hash-verified

231 self.assertEqual(math.tau, 2*math.pi)
232
233 def testAcos(self):
234 self.assertRaises(TypeError, math.acos)
235 self.ftest('acos(-1)', math.acos(-1), math.pi)
236 self.ftest('acos(0)', math.acos(0), math.pi/2)
237 self.ftest('acos(1)', math.acos(1), 0)
238 self.assertRaises(ValueError, math.acos, INF)
239 self.assertRaises(ValueError, math.acos, NINF)
240 self.assertRaises(ValueError, math.acos, 1 + eps)
241 self.assertRaises(ValueError, math.acos, -1 - eps)
242 self.assertTrue(math.isnan(math.acos(NAN)))
243
244 def testAcosh(self):
245 self.assertRaises(TypeError, math.acosh)

Callers

nothing calls this directly

Calls 3

ftestMethod · 0.95
assertTrueMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected