Python Unit Test Reporting to TeamCity (EXTENDED)
Project description
teamcity-messages-extra
teamcity-messages (JetBrains official package) has no activity for over one year.
This package will try to address some of the missing features by extending official one. It's not a fork, teamcity-messages is an actual dependency so that any dependency analysis tools (eg, dependency-check) properly identify it.
Usage
Just import teamcity_extra
instead of teamcity
. Everything from the official package will be available, plus the extra
.
Instead of:
from teamcity.messages import TeamcityServiceMessages
Use:
from teamcity_extra.messages import TeamcityServiceMessages
Extra
TeamcityServiceMessages.testMetadata
TeamcityServiceMessages.buildStatisticValue
buildStatisticValue service message
TeamcityServiceMessages.addBuildTag
TeamcityServiceMessages.addBuildTag
removeBuildTag service message
TeamcityServiceMessages.NO_OUTPUT
NO_OUTPUT output will make all service message calls / methods in TeamcityServiceMessages
to not print anything.
This allows for simpler code when teamcity output is optional
from teamcity_extra.messages import TeamcityServiceMessages, NO_OUTPUT
# None is the default value (stdout)
tsm = TeamcityServiceMessages(output=None if should_report_to_teamcity() else NO_OUTPUT)
with tsm.test('thisTest'):
doWhatever()