diff options
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r-- | numpy/testing/utils.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 27c371f1e..56512364d 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -12,10 +12,17 @@ __all__ = ['assert_equal', 'assert_almost_equal','assert_approx_equal', 'assert_array_equal', 'assert_array_less', 'assert_string_equal', 'assert_array_almost_equal', 'assert_raises', 'build_err_msg', 'decorate_methods', 'jiffies', 'memusage', 'print_assert_equal', - 'raises', 'rand', 'rundocs', 'runstring', 'verbose', 'measure'] + 'raises', 'rand', 'rundocs', 'runstring', 'verbose', 'measure', + 'assert_'] verbose = 0 +def assert_(val, msg) : + """Assert that works in release mode.""" + if not val : + raise AssertionError(msg) + + def rand(*args): """Returns an array of random numbers with the given shape. |