JetBrains/teamcity-python — pull request #26 by ralphje (2014-07-12 20:20:35+00:00)
Title: Unittest hierarchical names

Implementation of #24. Relies on my refactoring of the test framework in #23.

Instead of using `str` to get the name of a test, the unittestpy test runner should use `id()` to obtain the test name. This ensures that TeamCity is able to understand the hierarchy of the tests.

Rewriting `getTestName` to the following produces the desired result:

```python
def getTestName(self, test):
desc = test.shortDescription()
if desc:
return "%s (%s)" % (test.id(), desc)
return test.id()
```

Including the description with the test (which is done currently) may however be undesirable, as the test description could change while the method signature could remain the same.