mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
(Merge 3.2) Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes,
the file descriptor of a pipe closed in the parent process is valid in the child process according to fstat(), but the mode of the file descriptor is invalid, and read or write raise an error. test.support.requires_mac_ver() is now a decorator, as suggested by Ezio Melotti, and its docstring is fixed (linux_version => mac_ver).
This commit is contained in:
commit
ebbbdafd87
3 changed files with 31 additions and 18 deletions
|
|
@ -670,10 +670,9 @@ class MathTests(unittest.TestCase):
|
|||
self.assertTrue(math.isnan(math.log2(NAN)))
|
||||
|
||||
@requires_IEEE_754
|
||||
# log2() is not accurate enough on Mac OS X Tiger (10.4)
|
||||
@support.requires_mac_ver(10, 5)
|
||||
def testLog2Exact(self):
|
||||
# log2() is not accurate enough on Mac OS X Tiger (10.4)
|
||||
support.requires_mac_ver(10, 5)
|
||||
|
||||
# Check that we get exact equality for log2 of powers of 2.
|
||||
actual = [math.log2(math.ldexp(1.0, n)) for n in range(-1074, 1024)]
|
||||
expected = [float(n) for n in range(-1074, 1024)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue