Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Skip tan0064 in test_math and test_cmath on 32bit
Browse files Browse the repository at this point in the history
  • Loading branch information
carlwgeorge committed Apr 7, 2017
1 parent ec192ba commit 2007568
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
50 changes: 50 additions & 0 deletions SOURCES/00900-skip-tan0064-32bit.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
diff -Naurp a/Lib/test/test_cmath.py b/Lib/test/test_cmath.py
--- a/Lib/test/test_cmath.py 2017-03-21 01:32:38.000000000 -0500
+++ b/Lib/test/test_cmath.py 2017-04-06 13:36:37.923419432 -0500
@@ -346,6 +346,10 @@ class CMathTests(unittest.TestCase):
except ValueError:
pass

+ # These tests might fail on 32-bit.
+ SKIP_ON_32BIT = {'tan0064'}
+ is_32bit = platform.architecture()[0] == '32bit'
+
def rect_complex(z):
"""Wrapped version of rect that accepts a complex number instead of
two float arguments."""
@@ -365,6 +369,10 @@ class CMathTests(unittest.TestCase):
if id in SKIP_ON_TIGER:
continue

+ # Skip certain tests on 32-bit.
+ if is_32bit and id in SKIP_ON_32BIT:
+ continue
+
if fn == 'rect':
function = rect_complex
elif fn == 'polar':
diff -Naurp a/Lib/test/test_math.py b/Lib/test/test_math.py
--- a/Lib/test/test_math.py 2017-03-21 01:32:38.000000000 -0500
+++ b/Lib/test/test_math.py 2017-04-06 13:36:37.924419450 -0500
@@ -1176,6 +1176,10 @@ class MathTests(unittest.TestCase):
except ValueError:
pass

+ # These tests might fail on 32-bit.
+ SKIP_ON_32BIT = {'tan0064'}
+ is_32bit = platform.architecture()[0] == '32bit'
+
fail_fmt = "{}: {}({!r}): {}"

failures = []
@@ -1191,6 +1195,10 @@ class MathTests(unittest.TestCase):
if id in SKIP_ON_TIGER:
continue

+ # Skip certain tests on 32-bit.
+ if is_32bit and id in SKIP_ON_32BIT:
+ continue
+
func = getattr(math, fn)

if 'invalid' in flags or 'divide-by-zero' in flags:
5 changes: 5 additions & 0 deletions SPECS/python36u.spec
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ Patch252: 00252-add-executable-option.patch
# Reported upstream: http://bugs.python.org/issue29324
Patch258: 00258-fix-test_aead_aes_gcm.patch

# 00900 #
Patch900: 00900-skip-tan0064-32bit.patch

# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
Expand Down Expand Up @@ -583,6 +586,7 @@ cp -a %{SOURCE21} Lib/ensurepip/_bundled/
%patch249 -p1
%patch252 -p1
%patch258 -p1
%patch900 -p1

# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
# are many differences between 2.6 and the Python 3 library.
Expand Down Expand Up @@ -1476,6 +1480,7 @@ CheckPython optimized
- Remove minimum sqlite version (pybt#10740 and pybt#29098)
- Require correct version of expat{,-devel}
- Install the Makefile in its proper location (rhbz#1438219) (Fedora)
- Skip tan0064 in test_math and test_cmath on 32bit

* Wed Mar 22 2017 Carl George <carl.george@rackspace.com> - 3.6.1-1.ius
- Latest upstream
Expand Down

0 comments on commit 2007568

Please sign in to comment.