[Scipy-svn] r5412 - branches/0.7.x/scipy/weave/tests

scipy-svn@scip... scipy-svn@scip...
Fri Jan 9 04:46:23 CST 2009


Author: cdavid
Date: 2009-01-09 04:46:20 -0600 (Fri, 09 Jan 2009)
New Revision: 5412

Modified:
   branches/0.7.x/scipy/weave/tests/test_inline_tools.py
Log:
Backport 5402.

Modified: branches/0.7.x/scipy/weave/tests/test_inline_tools.py
===================================================================
--- branches/0.7.x/scipy/weave/tests/test_inline_tools.py	2009-01-09 10:15:55 UTC (rev 5411)
+++ branches/0.7.x/scipy/weave/tests/test_inline_tools.py	2009-01-09 10:46:20 UTC (rev 5412)
@@ -21,21 +21,25 @@
         result = inline_tools.inline(code,['a'])
         assert(result == 4)
 
-        try:
-            a = 1
-            result = inline_tools.inline(code,['a'])
-            assert(1) # should've thrown a ValueError
-        except ValueError:
-            pass
+## Unfortunately, it is not always possible to catch distutils compiler
+## errors, since SystemExit is used.  Until that is fixed, these tests
+## cannot be run in the same process as the test suite.
 
-        from distutils.errors import DistutilsError, CompileError
-        try:
-            a = 'string'
-            result = inline_tools.inline(code,['a'])
-            assert(1) # should've gotten an error
-        except:
-            # ?CompileError is the error reported, but catching it doesn't work
-            pass
+##         try:
+##             a = 1
+##             result = inline_tools.inline(code,['a'])
+##             assert(1) # should've thrown a ValueError
+##         except ValueError:
+##             pass
 
+##         from distutils.errors import DistutilsError, CompileError
+##         try:
+##             a = 'string'
+##             result = inline_tools.inline(code,['a'])
+##             assert(1) # should've gotten an error
+##         except:
+##             # ?CompileError is the error reported, but catching it doesn't work
+##             pass
+
 if __name__ == "__main__":
     nose.run(argv=['', __file__])



More information about the Scipy-svn mailing list