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.
........
This commit is contained in:
Mark Dickinson 2009-11-24 10:59:34 +00:00
parent 0e125f6b0a
commit 4ca33d1d77
1 changed files with 4 additions and 0 deletions

View File

@ -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")