diff options
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index f91ab8aa1..6829e06ae 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -1808,6 +1808,7 @@ class TestMedian(TestCase): a = MySubClass([1,2,3]) assert_equal(np.median(a), -7) + class TestAdd_newdoc_ufunc(TestCase): def test_ufunc_arg(self): @@ -1818,5 +1819,14 @@ class TestAdd_newdoc_ufunc(TestCase): assert_raises(TypeError, add_newdoc_ufunc, np.add, 3) +class TestAdd_newdoc(TestCase): + def test_add_doc(self): + # test np.add_newdoc + tgt = "Current flat index into the array." + self.assertEqual(np.core.flatiter.index.__doc__[:len(tgt)], tgt) + self.assertTrue(len(np.core.ufunc.identity.__doc__) > 300) + self.assertTrue(len(np.lib.index_tricks.mgrid.__doc__) > 300) + + if __name__ == "__main__": run_module_suite() |