def help(self, error=None, topic=None, parser=None):
"""Display an error message, or the named topic."""
assert error or topic or parser
if error:
print(error)
print("Use 'coverage help' for help.")
elif parser:
print(parser.format_help().strip())
else:
help_msg = HELP_TOPICS.get(topic, '').strip()
if help_msg:
print(help_msg % self.covpkg.__dict__)
else:
print("Don't know topic %r" % topic)
评论列表
文章目录