How to add -m unittest to Python runner TeamCity built configuration


Hey everyone, 

I am gonna try to describe to the best of my ability of what I need help with. I am not very good at writing requests lol.

So I just got TeamCity to work and I want to run a basic unit test on the server. As you may know, to run a unit test in python you need to execute the test file with "python3 -m unittest". I've been searching for 2 hours now in the built configurations and I still don't know how to set it up. I thought that I could simply add "-m unittest" in the command line arguments but when I look at the log it displays python3 "-m unittest" which makes sense to me now (dont judge). 


1 comment
Comment actions Permalink



If you need to run custom commands, you can use the command line runner rather than the specific build runners. Custom build runners have a limited subset of options typically but present them in an easier to use approach. Furthermore, the python build runner is not developed by the teamcity team, but by a separate developer on his own, so we cannot really provide support for its specifics as it's not under our control.


Please sign in to leave a comment.