summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_math.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-06-01 10:28:04 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-06-01 10:28:04 (GMT)
commitfce9233e93cb217a31d8c5b1776b4ec226595dc1 (patch)
treee3e94957b30d2f544cb9847c36601968f7bc9edd /Lib/test/test_math.py
parent197a59f49b1b3e99e04144b25b4bf8bf233e69df (diff)
downloadcpython-fce9233e93cb217a31d8c5b1776b4ec226595dc1.zip
cpython-fce9233e93cb217a31d8c5b1776b4ec226595dc1.tar.gz
cpython-fce9233e93cb217a31d8c5b1776b4ec226595dc1.tar.bz2
test.support: add requires_mac_ver() function
Add also linux_version() to __all__.
Diffstat (limited to 'Lib/test/test_math.py')
-rw-r--r--Lib/test/test_math.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 5b914d5..636ff2c 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -2,6 +2,7 @@
# XXXX Should not do tests around zero only
from test.support import run_unittest, verbose, requires_IEEE_754
+from test import support
import unittest
import math
import os
@@ -669,10 +670,10 @@ class MathTests(unittest.TestCase):
self.assertTrue(math.isnan(math.log2(NAN)))
@requires_IEEE_754
- @unittest.skipIf(sys.platform == 'darwin'
- and platform.mac_ver()[0].startswith('10.4.'),
- 'Mac OS X Tiger log2() is not accurate enough')
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)]