本文整理匯總了Python中nose.config.Config.help方法的典型用法代碼示例。如果您正苦於以下問題:Python Config.help方法的具體用法?Python Config.help怎麽用?Python Config.help使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nose.config.Config
的用法示例。
在下文中一共展示了Config.help方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: usage
# 需要導入模塊: from nose.config import Config [as 別名]
# 或者: from nose.config.Config import help [as 別名]
def usage():
conf = Config(plugins=BuiltinPluginManager())
usage_text = conf.help(nose.main.__doc__).replace('mkwiki.py', 'nosetests')
out = '{{{\n%s\n}}}\n' % usage_text
return out
示例2: print
# 需要導入模塊: from nose.config import Config [as 別名]
# 或者: from nose.config.Config import help [as 別名]
print("Commands...")
cmds = publish_parts(nose.commands.__doc__, reader=DocReader(),
writer_name='html')
docs['commands'] = cmds['body']
print("Changelog...")
changes = open(os.path.join(root, 'CHANGELOG'), 'r').read()
changes_html = publish_parts(changes, reader=DocReader(), writer_name='html')
docs['changelog'] = changes_html['body']
print("News...")
news = open(os.path.join(root, 'NEWS'), 'r').read()
news_html = publish_parts(news, reader=DocReader(), writer_name='html')
docs['news'] = news_html['body']
print("Usage...")
conf = Config(plugins=BuiltinPluginManager())
usage_txt = conf.help(nose.main.__doc__).replace(
'mkindex.py', 'nosetests')
docs['usage'] = '<pre>%s</pre>' % usage_txt
out = tpl % docs
index = open(os.path.join(root, 'index.html'), 'w')
index.write(out)
index.close()
readme = open(os.path.join(root, 'README.txt'), 'w')
readme.write(nose.__doc__)
readme.close()