MCPcopy Index your code
hub / github.com/google/python-fire / test_numpy_colon_in_description

Method test_numpy_colon_in_description

fire/docstrings_test.py:309–333  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

307 self.assertEqual(expected_output, docstrings._strip_blank_lines(lines)) # pylint: disable=protected-access
308
309 def test_numpy_colon_in_description(self):
310 docstring = """
311 Greets name.
312
313 Arguments
314 ---------
315 name : str
316 name, default : World
317 arg2 : int
318 arg2, default:None
319 arg3 : bool
320 """
321 docstring_info = docstrings.parse(docstring)
322 expected_docstring_info = DocstringInfo(
323 summary='Greets name.',
324 description=None,
325 args=[
326 ArgInfo(name='name', type='str',
327 description='name, default : World'),
328 ArgInfo(name='arg2', type='int',
329 description='arg2, default:None'),
330 ArgInfo(name='arg3', type='bool', description=None),
331 ]
332 )
333 self.assertEqual(expected_docstring_info, docstring_info)
334
335 def test_rst_format_typed_args_and_kwargs(self):
336 docstring = """Docstring summary.

Callers

nothing calls this directly

Calls 2

DocstringInfoClass · 0.85
ArgInfoClass · 0.85

Tested by

no test coverage detected