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
|
@ -106,12 +106,9 @@ class PowTest(unittest.TestCase):
|
|||
# platform pow() was buggy, and Python didn't worm around it.
|
||||
eq = self.assertEquals
|
||||
a = -1.0
|
||||
# XXX Temporary diagnostic for failure on alpha Debian buildbot
|
||||
from sys import __stdout__
|
||||
from math import floor
|
||||
print >> __stdout__, "*** Number: %r" % 1.23e167
|
||||
print >> __stdout__, "*** Floor: %r" % floor(1.23e167)
|
||||
# XXX End diagnostic message
|
||||
# The next two tests can still fail if the platform floor()
|
||||
# function doesn't treat all large inputs as integers
|
||||
# test_math should also fail if that is happening
|
||||
eq(pow(a, 1.23e167), 1.0)
|
||||
eq(pow(a, -1.23e167), 1.0)
|
||||
for b in range(-10, 11):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue