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

Method test_finite

Lib/test/test_statistics.py:826–829  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

824 # Test _isfinite private function.
825
826 def test_finite(self):
827 # Test that finite numbers are recognised as finite.
828 for x in (5, Fraction(1, 3), 2.5, Decimal("5.5")):
829 self.assertTrue(statistics._isfinite(x))
830
831 def test_infinity(self):
832 # Test that INFs are not recognised as finite.

Callers

nothing calls this directly

Calls 3

FractionClass · 0.90
DecimalClass · 0.90
assertTrueMethod · 0.80

Tested by

no test coverage detected