diff options
Diffstat (limited to 'numpy/linalg/tests/test_linalg.py')
-rw-r--r-- | numpy/linalg/tests/test_linalg.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py index 63baa590d..81347ac94 100644 --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -1152,6 +1152,8 @@ def test_xerbla_override(): # and may, or may not, abort the process depending on the LAPACK package. from nose import SkipTest + XERBLA_OK = 255 + try: pid = os.fork() except (OSError, AttributeError): @@ -1181,15 +1183,16 @@ def test_xerbla_override(): a, a, 0, 0) except ValueError as e: if "DORGQR parameter number 5" in str(e): - # success - os._exit(os.EX_OK) + # success, reuse error code to mark success as + # FORTRAN STOP returns as success. + os._exit(XERBLA_OK) # Did not abort, but our xerbla was not linked in. os._exit(os.EX_CONFIG) else: # parent pid, status = os.wait() - if os.WEXITSTATUS(status) != os.EX_OK or os.WIFSIGNALED(status): + if os.WEXITSTATUS(status) != XERBLA_OK: raise SkipTest('Numpy xerbla not linked in.') |