summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-11-24 10:59:34 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-11-24 10:59:34 (GMT)
commit4ca33d1d778e975eebbff5afcb5f3423f6144396 (patch)
treeff03d77281e8fcdb7347ddba232042501b10aab4 /Lib
parent0e125f6b0aea1c0029c8fd507c81069ce927eb60 (diff)
downloadcpython-4ca33d1d778e975eebbff5afcb5f3423f6144396.zip
cpython-4ca33d1d778e975eebbff5afcb5f3423f6144396.tar.gz
cpython-4ca33d1d778e975eebbff5afcb5f3423f6144396.tar.bz2
Merged revisions 76483 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76483 | mark.dickinson | 2009-11-24 10:54:58 +0000 (Tue, 24 Nov 2009) | 2 lines round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_float.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py
index 8ac936a..ebb666b 100644
--- a/Lib/test/test_float.py
+++ b/Lib/test/test_float.py
@@ -417,6 +417,10 @@ class RoundTestCase(unittest.TestCase):
self.assertRaises(OverflowError, round, INF)
self.assertRaises(OverflowError, round, -INF)
self.assertRaises(ValueError, round, NAN)
+ self.assertRaises(TypeError, round, INF, 0.0)
+ self.assertRaises(TypeError, round, -INF, 1.0)
+ self.assertRaises(TypeError, round, NAN, "ceci n'est pas un integer")
+ self.assertRaises(TypeError, round, -0.0, 1j)
@unittest.skipUnless(float.__getformat__("double").startswith("IEEE"),
"test requires IEEE 754 doubles")