diff options
Diffstat (limited to 'numpy/testing')
-rw-r--r-- | numpy/testing/numpytest.py | 2 | ||||
-rw-r--r-- | numpy/testing/utils.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/testing/numpytest.py b/numpy/testing/numpytest.py index 683df7a01..f72626cf0 100644 --- a/numpy/testing/numpytest.py +++ b/numpy/testing/numpytest.py @@ -43,7 +43,7 @@ def importall(package): name = package_name+'.'+subpackage_name try: exec 'import %s as m' % (name) - except Exception, msg: + except Exception as msg: print 'Failed importing %s: %s' %(name, msg) continue importall(m) diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 16ed0f803..2d3965594 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -643,7 +643,7 @@ def assert_array_compare(comparison, x, y, err_msg='', verbose=True, names=('x', 'y')) if not cond : raise AssertionError(msg) - except ValueError, e: + except ValueError as e: import traceback efmt = traceback.format_exc() header = 'error during assertion:\n\n%s\n\n%s' % (efmt, header) |