mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Add explicit test for a misbehaving math.floor
This commit is contained in:
parent
c473149a5a
commit
00f2029cd5
2 changed files with 7 additions and 6 deletions
|
@ -92,6 +92,10 @@ class MathTests(unittest.TestCase):
|
|||
self.ftest('floor(-0.5)', math.floor(-0.5), -1)
|
||||
self.ftest('floor(-1.0)', math.floor(-1.0), -1)
|
||||
self.ftest('floor(-1.5)', math.floor(-1.5), -2)
|
||||
# pow() relies on floor() to check for integers
|
||||
# This fails on some platforms - so check it here
|
||||
self.ftest('floor(1.23e167)', math.floor(1.23e167), 1.23e167)
|
||||
self.ftest('floor(-1.23e167)', math.floor(-1.23e167), -1.23e167)
|
||||
|
||||
def testFmod(self):
|
||||
self.assertRaises(TypeError, math.fmod)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue