本文整理汇总了Python中pants.help.build_dictionary_info_extracter.BuildDictionaryInfoExtracter.get_description_from_docstring方法的典型用法代码示例。如果您正苦于以下问题:Python BuildDictionaryInfoExtracter.get_description_from_docstring方法的具体用法?Python BuildDictionaryInfoExtracter.get_description_from_docstring怎么用?Python BuildDictionaryInfoExtracter.get_description_from_docstring使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pants.help.build_dictionary_info_extracter.BuildDictionaryInfoExtracter
的用法示例。
在下文中一共展示了BuildDictionaryInfoExtracter.get_description_from_docstring方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_description_from_docstring
# 需要导入模块: from pants.help.build_dictionary_info_extracter import BuildDictionaryInfoExtracter [as 别名]
# 或者: from pants.help.build_dictionary_info_extracter.BuildDictionaryInfoExtracter import get_description_from_docstring [as 别名]
def test_get_description_from_docstring(self):
class Test1(object):
"""First line.
Subsequent lines.
"""
self.assertEqual("First line.", BuildDictionaryInfoExtracter.get_description_from_docstring(Test1))
class Test2(object):
"""Only one line."""
self.assertEqual("Only one line.", BuildDictionaryInfoExtracter.get_description_from_docstring(Test2))
示例2: test_get_description_from_docstring
# 需要导入模块: from pants.help.build_dictionary_info_extracter import BuildDictionaryInfoExtracter [as 别名]
# 或者: from pants.help.build_dictionary_info_extracter.BuildDictionaryInfoExtracter import get_description_from_docstring [as 别名]
def test_get_description_from_docstring(self):
class Test1(object):
"""First line.
Subsequent
lines.
with indentations
"""
self.assertEqual(('First line.', ['Subsequent', 'lines.', '', ' with indentations']),
BuildDictionaryInfoExtracter.get_description_from_docstring(Test1))
class Test2(object):
"""Only one line."""
self.assertEqual(('Only one line.', []),
BuildDictionaryInfoExtracter.get_description_from_docstring(Test2))