(self)
| 106 | self.check_equal_hash(x, F.from_float(x)) |
| 107 | |
| 108 | def test_complex(self): |
| 109 | # complex numbers with zero imaginary part should hash equal to |
| 110 | # the corresponding float |
| 111 | |
| 112 | test_values = [0.0, -0.0, 1.0, -1.0, 0.40625, -5136.5, |
| 113 | float('inf'), float('-inf')] |
| 114 | |
| 115 | for zero in -0.0, 0.0: |
| 116 | for value in test_values: |
| 117 | self.check_equal_hash(value, complex(value, zero)) |
| 118 | |
| 119 | def test_decimals(self): |
| 120 | # check that Decimal instances that have different representations |
nothing calls this directly
no test coverage detected