(self)
| 966 | self.check_exact_equal(x, MyFraction(71, 13)) |
| 967 | |
| 968 | def test_float(self): |
| 969 | # Test conversions to float. |
| 970 | x = statistics._convert(Fraction(-1, 2), float) |
| 971 | self.check_exact_equal(x, -0.5) |
| 972 | class MyFloat(float): |
| 973 | def __truediv__(self, other): |
| 974 | return self.__class__(super().__truediv__(other)) |
| 975 | x = statistics._convert(Fraction(9, 8), MyFloat) |
| 976 | self.check_exact_equal(x, MyFloat(1.125)) |
| 977 | |
| 978 | def test_decimal(self): |
| 979 | # Test conversions to Decimal. |
nothing calls this directly
no test coverage detected