changeset 147:b850e4643542

* test/test.py: Catch all exceptions to handle unexpected errors
author Mike Miller <mtmiller@octave.org>
date Tue, 05 Apr 2016 08:58:22 -0700
parents 8e3d06f2f5cf
children ed2438a2d77a
files test/test.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/test.py	Tue Apr 05 08:08:45 2016 -0700
+++ b/test/test.py	Tue Apr 05 08:58:22 2016 -0700
@@ -62,7 +62,7 @@
         nvalue, = pytave.feval(1, "test_return", value)
         if not equals(value, nvalue):
             fail("as %s != %s" % (value, nvalue))
-    except TypeError, e:
+    except Exception, e:
         fail(value, e)
 
 
@@ -71,7 +71,7 @@
         nvalue, = pytave.feval(1, "test_return", value)
         if not equals(value, nvalue):
             fail("sent in %s, expecting %s, got %s", (value, expected, nvalue))
-    except TypeError, e:
+    except Exception, e:
         fail(value, e)
 
 
@@ -90,7 +90,7 @@
         if class1 != class2:
             fail("Type check failed for: %s. Expected %s. Got %s."
                  % (value, class1, class2))
-    except TypeError, e:
+    except Exception, e:
         fail("Execute failed: %s" % value, e)