(self)
| 976 | self.check_exact_equal(x, MyFloat(1.125)) |
| 977 | |
| 978 | def test_decimal(self): |
| 979 | # Test conversions to Decimal. |
| 980 | x = statistics._convert(Fraction(1, 40), Decimal) |
| 981 | self.check_exact_equal(x, Decimal("0.025")) |
| 982 | class MyDecimal(Decimal): |
| 983 | def __truediv__(self, other): |
| 984 | return self.__class__(super().__truediv__(other)) |
| 985 | x = statistics._convert(Fraction(-15, 16), MyDecimal) |
| 986 | self.check_exact_equal(x, MyDecimal("-0.9375")) |
| 987 | |
| 988 | def test_inf(self): |
| 989 | for INF in (float('inf'), Decimal('inf')): |
nothing calls this directly
no test coverage detected