本文整理汇总了Python中teamcity.messages.TeamcityServiceMessages类的典型用法代码示例。如果您正苦于以下问题:Python TeamcityServiceMessages类的具体用法?Python TeamcityServiceMessages怎么用?Python TeamcityServiceMessages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TeamcityServiceMessages类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_build_statistic_lines_uncovered
def test_build_statistic_lines_uncovered():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.buildStatisticLinesUncovered(5)
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[buildStatisticValue timestamp='2000-11-02T10:23:01.556' key='CodeCoverageAbsLUncovered' value='5']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例2: test_import_data
def test_import_data():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.importData('junit', '/path/to/junit.xml')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[importData timestamp='2000-11-02T10:23:01.556' path='/path/to/junit.xml' type='junit']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例3: test_set_parameter
def test_set_parameter():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.setParameter(name='env', value='mt3')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[setParameter timestamp='2000-11-02T10:23:01.556' name='env' value='mt3']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例4: test_block_closed
def test_block_closed():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.blockClosed('dummyMessage')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[blockClosed timestamp='2000-11-02T10:23:01.556' name='dummyMessage']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例5: test_build_problem
def test_build_problem():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.buildProblem(description='something is wrong', identity='me')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[buildProblem timestamp='2000-11-02T10:23:01.556' description='something is wrong' identity='me']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例6: test_build_status
def test_build_status():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.buildStatus(status='failure', text='compile error')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[buildStatus timestamp='2000-11-02T10:23:01.556' status='failure' text='compile error']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例7: test_test_stderr
def test_test_stderr():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.testStdErr(testName='only a test', out='out')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[testStdErr timestamp='2000-11-02T10:23:01.556' name='only a test' out='out']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例8: test_test_failed
def test_test_failed():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.testFailed(testName='only a test', message='some message', details='details')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[testFailed timestamp='2000-11-02T10:23:01.556' details='details' message='some message' name='only a test']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例9: test_test_suite_finished
def test_test_suite_finished():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.testSuiteFinished('suite emotion')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[testSuiteFinished timestamp='2000-11-02T10:23:01.556' name='suite emotion']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例10: test_compilation_finished
def test_compilation_finished():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.compilationFinished('gcc')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[compilationFinished timestamp='2000-11-02T10:23:01.556' compiler='gcc']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例11: test_build_statistic_value
def test_build_statistic_value():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.buildStatisticValue('CustomKey', '1234')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[buildStatisticValue timestamp='2000-11-02T10:23:01.556' key='CustomKey' value='1234']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例12: test_disable_service_messages
def test_disable_service_messages():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.disableServiceMessages()
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[disableServiceMessages timestamp='2000-11-02T10:23:01.556']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例13: test_publish_artifacts
def test_publish_artifacts():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.publishArtifacts('/path/to/file')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[publishArtifacts '/path/to/file']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例14: test_progress_message
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')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例15: test_custom_message
def test_custom_message():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
messages.customMessage('blah blah blah', status='all good')
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[message timestamp='2000-11-02T10:23:01.556' errorDetails='' status='all good' text='blah blah blah']
""").strip().encode('utf-8')
开发者ID:cmakara,项目名称:teamcity-messages,代码行数:7,代码来源:messages_test.py
示例16: test_one_property
def test_one_property(self):
stream = MessagesTest.StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: datetime.min)
messages.message("dummyMessage", fruit="apple")
self.assertEqual(
stream.observed_output, "\n##teamcity[dummyMessage timestamp='0001-01-01T00:00' fruit='apple']\n"
)
开发者ID:ralphje,项目名称:teamcity-python,代码行数:7,代码来源:core.py
示例17: test_three_properties
def test_three_properties(self):
stream = MessagesTest.StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: datetime.min)
messages.message("dummyMessage", fruit="apple", meat="steak", pie="raspberry")
self.assertEqual(
stream.observed_output,
"\n##teamcity[dummyMessage timestamp='0001-01-01T00:00' " "fruit='apple' meat='steak' pie='raspberry']\n",
)
开发者ID:ralphje,项目名称:teamcity-python,代码行数:8,代码来源:core.py
示例18: test_unicode
def test_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.message(bjork)
assert stream.observed_output == ("\n##teamcity[%s timestamp='2000-11-02T10:23:01.556']\n" % bjork).encode('utf-8')
开发者ID:lewisc,项目名称:teamcity-python,代码行数:9,代码来源:messages_test.py
示例19: test_test
def test_test():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
with messages.test('only a test'):
pass
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[testStarted timestamp='2000-11-02T10:23:01.556' name='only a test']
##teamcity[testFinished timestamp='2000-11-02T10:23:01.556' name='only a test']
""").strip().encode('utf-8')
开发者ID:,项目名称:,代码行数:9,代码来源:
示例20: test_progress
def test_progress():
stream = StreamStub()
messages = TeamcityServiceMessages(output=stream, now=lambda: fixed_date)
with messages.progress('only a test'):
pass
assert stream.observed_output.strip() == textwrap.dedent("""\
##teamcity[progressStart 'only a test']
##teamcity[progressFinish 'only a test']
""").strip().encode('utf-8')
开发者ID:,项目名称:,代码行数:9,代码来源:
注:本文中的teamcity.messages.TeamcityServiceMessages类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论