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

Function test_info_method_heading

numpy/lib/tests/test_utils.py:163–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161
162
163def test_info_method_heading():
164 # info(class) should only print "Methods:" heading if methods exist
165
166 class NoPublicMethods:
167 pass
168
169 class WithPublicMethods:
170 def first_method():
171 pass
172
173 def _has_method_heading(cls):
174 out = StringIO()
175 utils.info(cls, output=out)
176 return 'Methods:' in out.getvalue()
177
178 assert _has_method_heading(WithPublicMethods)
179 assert not _has_method_heading(NoPublicMethods)
180
181
182def test_drop_metadata():

Callers

nothing calls this directly

Calls 1

_has_method_headingFunction · 0.85

Tested by

no test coverage detected