diff options
author | seberg <sebastian@sipsolutions.net> | 2013-11-20 12:29:22 -0800 |
---|---|---|
committer | seberg <sebastian@sipsolutions.net> | 2013-11-20 12:29:22 -0800 |
commit | 78e29a323316642899f8ff85e538b785f0d5e31f (patch) | |
tree | fb197f0ea8f205721aa9590d9f0eafffad6aae9c /numpy/lib/tests/test_function_base.py | |
parent | 9f611dec1ebed4c8c933d5d310ceaf67aedbb8a4 (diff) | |
parent | 66174b8aa5644b11054b72761e89e22fd8a18eae (diff) | |
download | numpy-78e29a323316642899f8ff85e538b785f0d5e31f.tar.gz |
Merge pull request #4064 from juliantaylor/import-speed
ENH: improve add_newdocs performance
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() |