summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_math.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2016-09-04 08:58:51 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2016-09-04 08:58:51 (GMT)
commit85746542ead2e8994263b893f2d7560beb3bf1ca (patch)
tree40f74847b37137427c92b03b6d1de95aeb03f79b /Lib/test/test_math.py
parent96f774d8246e91bc30fc440b65f9c7a435462f45 (diff)
downloadcpython-85746542ead2e8994263b893f2d7560beb3bf1ca.zip
cpython-85746542ead2e8994263b893f2d7560beb3bf1ca.tar.gz
cpython-85746542ead2e8994263b893f2d7560beb3bf1ca.tar.bz2
Issue #27953: skip failing math and cmath tests for tan on OS X 10.4.
Diffstat (limited to 'Lib/test/test_math.py')
-rw-r--r--Lib/test/test_math.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 02d8b47..93b77b7 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -6,8 +6,9 @@ from test import support
import unittest
import math
import os
-import sys
+import platform
import struct
+import sys
import sysconfig
eps = 1E-05
@@ -1150,6 +1151,18 @@ class MathTests(unittest.TestCase):
@requires_IEEE_754
def test_testfile(self):
+ # Some tests need to be skipped on ancient OS X versions.
+ # See issue #27953.
+ SKIP_ON_TIGER = {'tan0064'}
+
+ osx_version = None
+ if sys.platform == 'darwin':
+ version_txt = platform.mac_ver()[0]
+ try:
+ osx_version = tuple(map(int, version_txt.split('.')))
+ except ValueError:
+ pass
+
fail_fmt = "{}: {}({!r}): {}"
failures = []
@@ -1160,6 +1173,10 @@ class MathTests(unittest.TestCase):
if fn in ['rect', 'polar']:
# no real versions of rect, polar
continue
+ # Skip certain tests on OS X 10.4.
+ if osx_version is not None and osx_version < (10, 5):
+ if id in SKIP_ON_TIGER:
+ continue
func = getattr(math, fn)