diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-10-03 20:03:31 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-10-03 20:06:48 -0600 |
commit | dc453917978e98dcdf3bbc106b080c80f0a1301e (patch) | |
tree | 010d0bea581ca040c93dcc41113e88fa69262f60 /numpy/lib/tests/test_function_base.py | |
parent | bbb7c3fbcdc2ddfcf79317661be2b99b1f6617e3 (diff) | |
download | numpy-dc453917978e98dcdf3bbc106b080c80f0a1301e.tar.gz |
BUG: Make numpy import when run with Python flag '-OO'.
This consists of checking for a docstring equal to None and skipping two
tests that require docstrings.
Closes #5148.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index ee38b3573..a3f805691 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -1,12 +1,14 @@ from __future__ import division, absolute_import, print_function import warnings +import sys import numpy as np from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises, - assert_allclose, assert_array_max_ulp, assert_warns, assert_raises_regex + assert_allclose, assert_array_max_ulp, assert_warns, + assert_raises_regex, dec ) from numpy.random import rand from numpy.lib import * @@ -2094,6 +2096,8 @@ class TestAdd_newdoc_ufunc(TestCase): class TestAdd_newdoc(TestCase): + + @dec.skipif(sys.flags.optimize == 2) def test_add_doc(self): # test np.add_newdoc tgt = "Current flat index into the array." |