summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fractions.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2008-06-27 10:11:52 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2008-06-27 10:11:52 (GMT)
commit3af386a5cb935a7efbfa30f33be3be80ed4d71fa (patch)
treebe5ad2753317bf29e60f9e6b90110fca1fbe4d80 /Lib/test/test_fractions.py
parent6e7e137cff5853ef0b2258b99df852e1ce098965 (diff)
downloadcpython-3af386a5cb935a7efbfa30f33be3be80ed4d71fa.zip
cpython-3af386a5cb935a7efbfa30f33be3be80ed4d71fa.tar.gz
cpython-3af386a5cb935a7efbfa30f33be3be80ed4d71fa.tar.bz2
Remove trailing 'L's from numerator and denominator in the
repr() of a Fraction instance.
Diffstat (limited to 'Lib/test/test_fractions.py')
-rw-r--r--Lib/test/test_fractions.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py
index 3d90b5a..f2d7141 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -351,6 +351,10 @@ class FractionTest(unittest.TestCase):
def testStringification(self):
self.assertEquals("Fraction(7, 3)", repr(F(7, 3)))
+ self.assertEquals("Fraction(6283185307, 2000000000)",
+ repr(F('3.1415926535')))
+ self.assertEquals("Fraction(-1, 100000000000000000000)",
+ repr(F(1, -10**20)))
self.assertEquals("7/3", str(F(7, 3)))
self.assertEquals("7", str(F(7, 1)))