(self)
| 778 | self.assertEqual(statistics._exact_ratio(-inf), (-inf, None)) |
| 779 | |
| 780 | def test_nan(self): |
| 781 | # Test that NANs are handled correctly. |
| 782 | for nan in (Decimal('NAN'), Decimal('sNAN')): |
| 783 | num, den = statistics._exact_ratio(nan) |
| 784 | # Because NANs always compare non-equal, we cannot use assertEqual. |
| 785 | # Nor can we use an identity test, as we don't guarantee anything |
| 786 | # about the object identity. |
| 787 | self.assertTrue(_nan_equal(num, nan)) |
| 788 | self.assertIs(den, None) |
| 789 | |
| 790 | def test_sign(self): |
| 791 | # Test sign is calculated correctly. |
nothing calls this directly
no test coverage detected