JetBrains / teamcity-messages

Python Unit Test Reporting to TeamCity
https://pypi.python.org/pypi/teamcity-messages
Apache License 2.0
136 stars 81 forks source link

test misorganization in heirarchical logs #254

Open fitzymj opened 2 years ago

fitzymj commented 2 years ago

I run some Python unit tests as part of a larger build, and I just started using the TeamcityTestRunner from this package, as so:

        runner_class = TeamcityTestRunner if is_running_under_teamcity() else unittest.TextTestRunner
        runner = runner_class(stream=sys.stdout, verbosity=2)
        result = runner.run(unittest.defaultTestLoader.discover("igpy", pattern="*.py"))

In the heirarchical log view, this causes them to get hoisted up out of my normal set of message blocks and into the top level, all the way at the bottom of the log.

teamcity_test

Is there a way around this? I assume it has to do with the test messages getting flowId attributes, whereas I don't otherwise use those in my build.