mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Manually merge r68095,68186,68187,68188,68190 from 2.6 branch.
This commit is contained in:
parent
c63785db86
commit
fe427895b5
5 changed files with 25 additions and 8 deletions
|
@ -139,6 +139,8 @@ class FractionTest(unittest.TestCase):
|
|||
def testFromFloat(self):
|
||||
self.assertRaises(TypeError, F.from_float, 3+4j)
|
||||
self.assertEquals((10, 1), _components(F.from_float(10)))
|
||||
bigint = 1234567890123456789
|
||||
self.assertEquals((bigint, 1), _components(F.from_float(bigint)))
|
||||
self.assertEquals((0, 1), _components(F.from_float(-0.0)))
|
||||
self.assertEquals((10, 1), _components(F.from_float(10.0)))
|
||||
self.assertEquals((-5, 2), _components(F.from_float(-2.5)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue