本文整理汇总了Python中service_messages.assert_service_messages函数的典型用法代码示例。如果您正苦于以下问题:Python assert_service_messages函数的具体用法?Python assert_service_messages怎么用?Python assert_service_messages使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了assert_service_messages函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_diff
def test_diff(venv):
output = run_directly(venv, SCRIPT)
assert_service_messages(
output,
[
ServiceMessage('testCount', {'count': "3"}),
] + expected_messages("__main__.FooTest"))
开发者ID:JetBrains,项目名称:teamcity-messages,代码行数:7,代码来源:unittest_integration_test.py
示例2: test_params
def test_params(venv):
output = run(venv, "params_test.py")
test1_name = "tests.guinea-pigs.pytest.params_test.test_eval|[3+5-8|]"
test2_name = "tests.guinea-pigs.pytest.params_test.test_eval|[|'1_5|' + |'2|'-1_52|]"
test3_name = "tests.guinea-pigs.pytest.params_test.test_eval|[6*9-42|]"
assert_service_messages(
output,
[
ServiceMessage("testStarted", {"name": test1_name}),
ServiceMessage("testFinished", {"name": test1_name}),
ServiceMessage("testStarted", {"name": test2_name}),
ServiceMessage("testFinished", {"name": test2_name}),
ServiceMessage("testStarted", {"name": test3_name}),
ServiceMessage(
"testFailed",
{
"name": test3_name,
"message": fix_slashes("tests/guinea-pigs/pytest/params_test.py") + ":3 (test_eval|[6*9-42|])",
},
),
ServiceMessage("testFinished", {"name": test3_name}),
],
)
开发者ID:JetBrains,项目名称:teamcity-messages,代码行数:25,代码来源:pytest_integration_test.py
示例3: test_diff
def test_diff(venv):
output = run(venv, SCRIPT)
assert_service_messages(
output,
[
_test_count(venv, 3),
] + expected_messages('diff_assert.FooTest'))
开发者ID:JetBrains,项目名称:teamcity-messages,代码行数:7,代码来源:nose_integration_test.py
示例4: test_pass
def test_pass(venv):
output = run(venv, 'nose-guinea-pig.py', 'GuineaPig', 'test_pass')
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': 'nose-guinea-pig.GuineaPig.test_pass'}),
ServiceMessage('testFinished', {'name': 'nose-guinea-pig.GuineaPig.test_pass'}),
])
开发者ID:djeebus,项目名称:teamcity-python,代码行数:8,代码来源:nose_integration_test.py
示例5: test_discovery
def test_discovery(venv):
output = run_directly(venv, 'discovery.py')
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': 'testsimple.TestTeamcityMessages.runTest'}),
ServiceMessage('testFinished', {'name': 'testsimple.TestTeamcityMessages.runTest'}),
])
开发者ID:capgelka,项目名称:teamcity-messages,代码行数:8,代码来源:unittest_integration_test.py
示例6: test_hierarchy
def test_hierarchy(venv):
output = run(venv, 'hierarchy')
test_name = 'namespace1.namespace2.testmyzz.test'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'captureStandardOutput': 'true', 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name, 'flowId': test_name}),
])
开发者ID:djeebus,项目名称:teamcity-python,代码行数:9,代码来源:nose_integration_test.py
示例7: test_nested_suits
def test_nested_suits(venv):
output = run_directly(venv, 'nested_suits.py')
test_name = '__main__.TestXXX.runTest'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'captureStandardOutput': 'true', 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name}),
])
开发者ID:capgelka,项目名称:teamcity-messages,代码行数:9,代码来源:unittest_integration_test.py
示例8: test_class_with_method
def test_class_with_method(venv):
output = run(venv, 'class_with_method.py')
assert_service_messages(
output,
[ServiceMessage('testCount', {'count': "1"})] +
[ServiceMessage('testStarted', {"metainfo": "test_method"})] +
[ServiceMessage('testFailed', {})] +
[ServiceMessage('testFinished', {})]
)
开发者ID:JetBrains,项目名称:teamcity-messages,代码行数:9,代码来源:pytest_integration_test.py
示例9: test_hierarchy
def test_hierarchy(venv):
output = run(venv, 'namespace')
test_name = 'tests.guinea-pigs.pytest.namespace.pig_test.TestSmoke.test_smoke'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name, 'flowId': test_name}),
])
开发者ID:lewisc,项目名称:teamcity-python,代码行数:9,代码来源:pytest_integration_test.py
示例10: test_changes_name
def test_changes_name(venv):
output = run_directly(venv, 'test_changes_name.py')
assert_service_messages(
output,
[
ServiceMessage('testCount', {'count': "1"}),
ServiceMessage('testStarted', {'name': "__main__.Foo.test_aa (1)", 'flowId': "__main__.Foo.test_aa (1)"}),
ServiceMessage('testFinished', {'name': "__main__.Foo.test_aa (11)", 'flowId': "__main__.Foo.test_aa (11)"}),
])
开发者ID:JetBrains,项目名称:teamcity-messages,代码行数:9,代码来源:unittest_integration_test.py
示例11: test_doctests
def test_doctests(venv):
output = run(venv, 'doctests', options="--with-doctest")
test_name = 'doctests.namespace1.d.multiply'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name, 'flowId': test_name}),
])
开发者ID:djeebus,项目名称:teamcity-python,代码行数:9,代码来源:nose_integration_test.py
示例12: test_docstrings
def test_docstrings(venv):
output = run(venv, 'docstrings')
test_name = 'testa.test_func (My cool test_name)'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name, 'flowId': test_name}),
])
开发者ID:djeebus,项目名称:teamcity-python,代码行数:9,代码来源:nose_integration_test.py
示例13: test_docstring
def test_docstring(venv):
output = run_directly(venv, 'docstring.py')
test_name = '__main__.TestXXX.runTest (A test_)'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name, 'flowId': test_name}),
])
开发者ID:capgelka,项目名称:teamcity-messages,代码行数:9,代码来源:unittest_integration_test.py
示例14: test_doctests
def test_doctests(venv):
output = run_directly(venv, 'doctests.py')
test_name = '__main__.factorial'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name, 'flowId': test_name}),
])
开发者ID:capgelka,项目名称:teamcity-messages,代码行数:9,代码来源:unittest_integration_test.py
示例15: test_diff_top_level_assert_error
def test_diff_top_level_assert_error(venv):
output = run(venv, "../diff_toplevel_assert_error.py")
assert_service_messages(
output,
[
ServiceMessage('testCount', {'count': "1"}),
ServiceMessage('testStarted', {'name': "tests.guinea-pigs.diff_toplevel_assert_error.test_test"}),
ServiceMessage('testFailed', {'name': "tests.guinea-pigs.diff_toplevel_assert_error.test_test", "actual": "spam", "expected": "eggs"}),
ServiceMessage('testFinished', {'name': "tests.guinea-pigs.diff_toplevel_assert_error.test_test"}),
])
开发者ID:JetBrains,项目名称:teamcity-messages,代码行数:10,代码来源:pytest_integration_test.py
示例16: test_skip
def test_skip(venv):
output = run(venv, 'skiptest')
test_name = 'testa.test_func'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'flowId': test_name}),
ServiceMessage('testIgnored', {'name': test_name, 'message': 'SKIPPED: my skip', 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name, 'flowId': test_name}),
])
开发者ID:capgelka,项目名称:teamcity-messages,代码行数:10,代码来源:nose_integration_test.py
示例17: test_deprecated
def test_deprecated(venv):
output = run(venv, 'deprecatedtest')
test_name = 'testa.test_func'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name, 'flowId': test_name}),
ServiceMessage('testIgnored', {'name': test_name, 'message': 'Deprecated', 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name, 'flowId': test_name}),
])
开发者ID:djeebus,项目名称:teamcity-python,代码行数:10,代码来源:nose_integration_test.py
示例18: test_skip
def test_skip(venv):
output = run(venv, 'skip_test.py')
test_name = 'tests.guinea-pigs.pytest.skip_test.test_function'
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': test_name}),
ServiceMessage('testIgnored', {'message': 'Skipped: skip reason', 'flowId': test_name}),
ServiceMessage('testFinished', {'name': test_name}),
])
开发者ID:lewisc,项目名称:teamcity-python,代码行数:10,代码来源:pytest_integration_test.py
示例19: test_custom_test_items
def test_custom_test_items(venv):
output = run(venv, 'custom')
assert_service_messages(
output,
[
ServiceMessage('testStarted', {'name': 'tests.guinea-pigs.pytest.custom.test_simple_yml.line1'}),
ServiceMessage('testFinished', {'name': 'tests.guinea-pigs.pytest.custom.test_simple_yml.line1'}),
ServiceMessage('testStarted', {'name': 'tests.guinea-pigs.pytest.custom.test_simple_yml.line2'}),
ServiceMessage('testFinished', {'name': 'tests.guinea-pigs.pytest.custom.test_simple_yml.line2'}),
])
开发者ID:lewisc,项目名称:teamcity-python,代码行数:10,代码来源:pytest_integration_test.py
示例20: test_diff
def test_diff(venv):
if "pytest==2.7" in venv.packages:
pytest.skip("Diff is broken for ancient pytest")
output = run(venv, SCRIPT)
assert_service_messages(
output,
[
ServiceMessage('testCount', {'count': "3"}),
] + expected_messages("tests.guinea-pigs.diff_assert.FooTest"))
开发者ID:JetBrains,项目名称:teamcity-messages,代码行数:10,代码来源:pytest_integration_test.py
注:本文中的service_messages.assert_service_messages函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论