This repository was archived by the owner on Oct 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip tan0064 in test_math and test_cmath on 32bit
- Loading branch information
1 parent
ec192ba
commit 2007568
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters