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

Function test_deprecate_help_indentation

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

Source from the content-addressed store, hash-verified

94 (old_func6, new_func6),
95])
96def test_deprecate_help_indentation(old_func, new_func):
97 _compare_docs(old_func, new_func)
98 # Ensure we don't mess up the indentation
99 for knd, func in (('old', old_func), ('new', new_func)):
100 for li, line in enumerate(func.__doc__.split('\n')):
101 if li == 0:
102 assert line.startswith(' ') or not line.startswith(' '), knd
103 elif line:
104 assert line.startswith(' '), knd
105
106
107def _compare_docs(old_func, new_func):

Callers

nothing calls this directly

Calls 3

_compare_docsFunction · 0.85
startswithMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected