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

Method testAcos

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

Source from the content-addressed store, hash-verified

264 self.assertEqual(math.tau, 2*math.pi)
265
266 def testAcos(self):
267 self.assertRaises(TypeError, math.acos)
268 self.ftest('acos(-1)', math.acos(-1), math.pi)
269 self.ftest('acos(0)', math.acos(0), math.pi/2)
270 self.ftest('acos(1)', math.acos(1), 0)
271 self.assertRaises(ValueError, math.acos, INF)
272 self.assertRaises(ValueError, math.acos, NINF)
273 self.assertRaises(ValueError, math.acos, 1 + eps)
274 self.assertRaises(ValueError, math.acos, -1 - eps)
275 self.assertTrue(math.isnan(math.acos(NAN)))
276
277 def testAcosh(self):
278 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