本文整理汇总了Python中teamcity.messages.TeamcityServiceMessages.progressMessage方法的典型用法代码示例。如果您正苦于以下问题:Python TeamcityServiceMessages.progressMessage方法的具体用法?Python TeamcityServiceMessages.progressMessage怎么用?Python TeamcityServiceMessages.progressMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类teamcity.messages.TeamcityServiceMessages
的用法示例。
在下文中一共展示了TeamcityServiceMessages.progressMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_progress_message
# 需要导入模块: from teamcity.messages import TeamcityServiceMessages [as 别名]
# 或者: from teamcity.messages.TeamcityServiceMessages import progressMessage [as 别名]
def test_progress_message():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.progressMessage('doing stuff')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[progressMessage 'doing stuff']
""").strip().encode('utf-8')
示例2: test_progress_message_unicode
# 需要导入模块: from teamcity.messages import TeamcityServiceMessages [as 别名]
# 或者: from teamcity.messages.TeamcityServiceMessages import progressMessage [as 别名]
def test_progress_message_unicode():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
if sys.version_info < (3, ):
bjork = 'Bj\xc3\xb6rk Gu\xc3\xb0mundsd\xc3\xb3ttir'.decode('utf-8')
else:
bjork = b('Bj\xc3\xb6rk Gu\xc3\xb0mundsd\xc3\xb3ttir').decode('utf-8')
messages.progressMessage(bjork)
expected_output = b(
"##teamcity[progressMessage "
"'Bj\xc3\xb6rk Gu\xc3\xb0mundsd\xc3\xb3ttir']")
assert stream.observed_output.strip() == expected_output