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

Method test_is_infinite

Lib/test/test_decimal.py:3272–3279  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3270 self.assertRaises(TypeError, c.is_finite, '10')
3271
3272 def test_is_infinite(self):
3273 Decimal = self.decimal.Decimal
3274 Context = self.decimal.Context
3275
3276 c = Context()
3277 d = c.is_infinite(Decimal(10))
3278 self.assertEqual(c.is_infinite(10), d)
3279 self.assertRaises(TypeError, c.is_infinite, '10')
3280
3281 def test_is_nan(self):
3282 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

is_infiniteMethod · 0.95
DecimalClass · 0.85
ContextClass · 0.70
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected