summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-10-20 21:24:28 +0200
committerPauli Virtanen <pav@iki.fi>2010-10-20 21:37:23 +0200
commitc0bd3dfe43e3ec554f30521a86a3ef9fe3e98273 (patch)
tree917ce52ad944460d5f84690869fd04c1a5938a96
parentc6504f5d2637d45376e4b4e6f99438923033922d (diff)
downloadnumpy-c0bd3dfe43e3ec554f30521a86a3ef9fe3e98273.tar.gz
TST: core: disable C99 complex tests also on Solaris if it seems that the platform functions are flaky
-rw-r--r--numpy/core/tests/test_umath_complex.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/core/tests/test_umath_complex.py b/numpy/core/tests/test_umath_complex.py
index 52fd2ab66..bcc05e333 100644
--- a/numpy/core/tests/test_umath_complex.py
+++ b/numpy/core/tests/test_umath_complex.py
@@ -10,13 +10,16 @@ import numpy as np
# At least on Windows the results of many complex functions are not conforming
# to the C99 standard. See ticket 1574.
-err = np.seterr(invalid='ignore')
+# Ditto for Solaris (ticket 1642).
+err = np.seterr(invalid='ignore', divide='ignore')
try:
- functions_seem_flaky = (np.exp(complex(np.inf, 0)).imag != 0)
+ functions_seem_flaky = ((np.exp(complex(np.inf, 0)).imag != 0)
+ or (np.log(complex(np.NZERO, 0)).imag != np.pi))
finally:
np.seterr(**err)
# TODO: replace with a check on whether platform-provided C99 funcs are used
-have_platform_functions = (sys.platform == 'win32')
+have_platform_functions = (sys.platform.startswith('win')
+ or sys.platform.startswith('sunos'))
skip_complex_tests = have_platform_functions and functions_seem_flaky
def platform_skip(func):