[Numpy-svn] r5988 - trunk/numpy/linalg/tests

numpy-svn@scip... numpy-svn@scip...
Sat Nov 8 00:52:06 CST 2008


Author: cdavid
Date: 2008-11-08 00:51:59 -0600 (Sat, 08 Nov 2008)
New Revision: 5988

Modified:
   trunk/numpy/linalg/tests/test_build.py
Log:
Detect gfrotran/g77 mismatch.

Modified: trunk/numpy/linalg/tests/test_build.py
===================================================================
--- trunk/numpy/linalg/tests/test_build.py	2008-11-08 06:51:42 UTC (rev 5987)
+++ trunk/numpy/linalg/tests/test_build.py	2008-11-08 06:51:59 UTC (rev 5988)
@@ -3,7 +3,8 @@
 import re
 
 import numpy as np
-from numpy.testing import TestCase
+from numpy.linalg import lapack_lite
+from numpy.testing import TestCase, dec
 
 class FindDependenciesLdd:
     def __init__(self):
@@ -33,3 +34,14 @@
                     founds.append(k)
 
         return founds
+
+@dec.skipif(not(sys.platform[:5] == 'linux'), 
+            "Skipping fortran compiler mismatch on non Linux platform")
+def test_f77_mismatch():
+    f = FindDependenciesLdd()
+    deps = f.grep_dependencies(lapack_lite.__file__, 
+                               ['libg2c', 'libgfortran'])
+    if len(deps) > 1:
+        raise AssertionFailure("Both g77 and gfortran runtimes linked in "\
+        "lapack_lite ! This is likely to cause random crashes and wrong "\
+        "results")



More information about the Numpy-svn mailing list