Custom setuptools command to run tests in a TeamCity compatible manner
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Setuptools Command to Run Tests in a TeamCity-compatible Manner

If you use python setuptools ( and run your project in TeamCity, you want to be able to see which tests failed and which tests got executed. This code does exactly that.


Instead of running:

python test


python --command-packages teamcity_test teamcity_test

which does exactly the same, but uses TeamCity build script interaction to communicate with the TeamCity build agent. This code is just an extension of the nice teamcity-messages module available under


python install