kiwitcms/tap-plugin

Feature: Include traceback as comments

atodorov opened this issue · 0 comments

Consider the following TAP output:

not ok 4 test_when_plugin_initializes_then_uses_environment (tests.test_api_config.GivenConfigurationFileDoesntExist)
# Traceback (most recent call last):
#   File "/opt/rh/rh-python36/root/usr/lib64/python3.6/unittest/case.py", line 60, in testPartExecutor
#     yield
#   File "/opt/rh/rh-python36/root/usr/lib64/python3.6/unittest/case.py", line 643, in run
#     testMethod()
#   File "/home/senko/tap-plugin/tests/test_api_config.py", line 11, in test_when_plugin_initializes_then_uses_environment
#     self.fail('not implemented')
#   File "/opt/rh/rh-python36/root/usr/lib64/python3.6/unittest/case.py", line 708, in fail
#     raise self.failureException(msg)
# AssertionError: not implemented
# TAP results for GivenConfigurationFileExists
not ok 5 test_when_plugin_initializes_then_uses_config (tests.test_api_config.GivenConfigurationFileExists)
# Traceback (most recent call last):
#   File "/opt/rh/rh-python36/root/usr/lib64/python3.6/unittest/case.py", line 60, in testPartExecutor
#     yield
#   File "/opt/rh/rh-python36/root/usr/lib64/python3.6/unittest/case.py", line 643, in run
#     testMethod()
#   File "/home/senko/tap-plugin/tests/test_api_config.py", line 6, in test_when_plugin_initializes_then_uses_config
#     self.fail('not implemented')
#   File "/opt/rh/rh-python36/root/usr/lib64/python3.6/unittest/case.py", line 708, in fail
#     raise self.failureException(msg)
# AssertionError: not implemented
# TAP results for GivenBuildDoesntExistInDatabase
ok 6 test_when_get_build_id_then_will_add_it (tests.test_build.GivenBuildDoesntExistInDatabase)
# TAP results for GivenBuildEnvironmentIsNotPresent
ok 7 test_when_get_build_id_then_will_raise (tests.test_build.GivenBuildEnvironmentIsNotPresent)

I want the traceback as comments b/c this will make it easier to figure out what happened, directly in Kiwi TCMS.