MCPcopy Create free account
hub / github.com/numpy/numpy / _compare_docs

Function _compare_docs

numpy/lib/tests/test_utils.py:107–111  ·  view source on GitHub ↗
(old_func, new_func)

Source from the content-addressed store, hash-verified

105
106
107def _compare_docs(old_func, new_func):
108 old_doc = inspect.getdoc(old_func)
109 new_doc = inspect.getdoc(new_func)
110 index = new_doc.index('\n\n') + 2
111 assert_equal(new_doc[index:], old_doc)
112
113
114@pytest.mark.skipif(sys.flags.optimize == 2, reason="-OO discards docstrings")

Callers 1

Calls 3

assert_equalFunction · 0.90
getdocMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected