summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-24 19:30:19 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-24 19:30:19 (GMT)
commit5b0e27e50d33f33515f31ff6fec123f5e2be9d73 (patch)
tree89c7bda9381f616f1cc09c32eaea319b37aa3201 /Lib/test
parent5ca924038dd196217cedd4b02480ea16acd634f3 (diff)
downloadcpython-5b0e27e50d33f33515f31ff6fec123f5e2be9d73.zip
cpython-5b0e27e50d33f33515f31ff6fec123f5e2be9d73.tar.gz
cpython-5b0e27e50d33f33515f31ff6fec123f5e2be9d73.tar.bz2
Add support for int(r) just like the other numeric classes.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_rational.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_rational.py b/Lib/test/test_rational.py
index 0f0a48d..3242e43 100644
--- a/Lib/test/test_rational.py
+++ b/Lib/test/test_rational.py
@@ -160,6 +160,7 @@ class RationalTest(unittest.TestCase):
def testConversions(self):
self.assertTypedEquals(-1, trunc(R(-11, 10)))
+ self.assertTypedEquals(-1, int(R(-11, 10)))
self.assertTypedEquals(-2, R(-11, 10).__floor__())
self.assertTypedEquals(-1, R(-11, 10).__ceil__())
self.assertTypedEquals(-1, R(-10, 10).__ceil__())