summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_math.py
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2008-01-05 20:03:11 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2008-01-05 20:03:11 (GMT)
commitc2155835b49261c7f755774a16d6576c904395ec (patch)
treedae59f83cbe0884f608698e4205ab86245478367 /Lib/test/test_math.py
parentd348b2587e01f76a30c07bfa248653bb6b60142f (diff)
downloadcpython-c2155835b49261c7f755774a16d6576c904395ec.zip
cpython-c2155835b49261c7f755774a16d6576c904395ec.tar.gz
cpython-c2155835b49261c7f755774a16d6576c904395ec.tar.bz2
Make math.floor and math.ceil return ints instead of floats.
Diffstat (limited to 'Lib/test/test_math.py')
-rw-r--r--Lib/test/test_math.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 8449794..2333392 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -51,6 +51,7 @@ class MathTests(unittest.TestCase):
def testCeil(self):
self.assertRaises(TypeError, math.ceil)
+ self.assertEquals(int, type(math.ceil(0.5)))
self.ftest('ceil(0.5)', math.ceil(0.5), 1)
self.ftest('ceil(1.0)', math.ceil(1.0), 1)
self.ftest('ceil(1.5)', math.ceil(1.5), 2)
@@ -103,6 +104,7 @@ class MathTests(unittest.TestCase):
def testFloor(self):
self.assertRaises(TypeError, math.floor)
+ self.assertEquals(int, type(math.floor(0.5)))
self.ftest('floor(0.5)', math.floor(0.5), 0)
self.ftest('floor(1.0)', math.floor(1.0), 1)
self.ftest('floor(1.5)', math.floor(1.5), 1)