summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_rational.py
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2008-01-31 17:45:59 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2008-01-31 17:45:59 (GMT)
commit38db364076e593a5111ce948b6379f15819fcaf8 (patch)
tree51d5f0f09159a25aac113e41656cd552c8b1374c /Lib/test/test_rational.py
parentb23dea6adb7eaf3f415e05b129afa01fa1c4dd5c (diff)
downloadcpython-38db364076e593a5111ce948b6379f15819fcaf8.zip
cpython-38db364076e593a5111ce948b6379f15819fcaf8.tar.gz
cpython-38db364076e593a5111ce948b6379f15819fcaf8.tar.bz2
Remove unused to-be-magic methods from Rational per issue 1968. Do not port
this patch to py3k.
Diffstat (limited to 'Lib/test/test_rational.py')
-rw-r--r--Lib/test/test_rational.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/Lib/test/test_rational.py b/Lib/test/test_rational.py
index bd700b1..b97922c 100644
--- a/Lib/test/test_rational.py
+++ b/Lib/test/test_rational.py
@@ -197,14 +197,6 @@ 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__())
-
- self.assertTypedEquals(0, R(-1, 10).__round__())
- self.assertTypedEquals(0, R(-5, 10).__round__())
- self.assertTypedEquals(-2, R(-15, 10).__round__())
- self.assertTypedEquals(-1, R(-7, 10).__round__())
self.assertEquals(False, bool(R(0, 1)))
self.assertEquals(True, bool(R(3, 2)))
@@ -218,13 +210,6 @@ class RationalTest(unittest.TestCase):
self.assertTypedEquals(0.1+0j, complex(R(1,10)))
- def testRound(self):
- self.assertTypedEquals(R(-200), R(-150).__round__(-2))
- self.assertTypedEquals(R(-200), R(-250).__round__(-2))
- self.assertTypedEquals(R(30), R(26).__round__(-1))
- self.assertTypedEquals(R(-2, 10), R(-15, 100).__round__(1))
- self.assertTypedEquals(R(-2, 10), R(-25, 100).__round__(1))
-
def testArithmetic(self):
self.assertEquals(R(1, 2), R(1, 10) + R(2, 5))