(self)
| 1145 | self.assertEqual("7", str(F(7, 1))) |
| 1146 | |
| 1147 | def testHash(self): |
| 1148 | hmod = sys.hash_info.modulus |
| 1149 | hinf = sys.hash_info.inf |
| 1150 | self.assertEqual(hash(2.5), hash(F(5, 2))) |
| 1151 | self.assertEqual(hash(10**50), hash(F(10**50))) |
| 1152 | self.assertNotEqual(hash(float(10**23)), hash(F(10**23))) |
| 1153 | self.assertEqual(hinf, hash(F(1, hmod))) |
| 1154 | # Check that __hash__ produces the same value as hash(), for |
| 1155 | # consistency with int and Decimal. (See issue #10356.) |
| 1156 | self.assertEqual(hash(F(-1)), F(-1).__hash__()) |
| 1157 | |
| 1158 | def testApproximatePi(self): |
| 1159 | # Algorithm borrowed from |
nothing calls this directly
no test coverage detected