(self)
| 747 | self.assertTrue(math.isinf(ratio[0])) |
| 748 | |
| 749 | def test_float_nan(self): |
| 750 | NAN = float("NAN") |
| 751 | class MyFloat(float): |
| 752 | pass |
| 753 | for nan in (NAN, MyFloat(NAN)): |
| 754 | ratio = statistics._exact_ratio(nan) |
| 755 | self.assertTrue(math.isnan(ratio[0])) |
| 756 | self.assertIs(ratio[1], None) |
| 757 | self.assertEqual(type(ratio[0]), type(nan)) |
| 758 | |
| 759 | def test_decimal_nan(self): |
| 760 | NAN = Decimal("NAN") |
nothing calls this directly
no test coverage detected