*Pythonic-way* сделать тоже самое:
```python
try:
    self.full_test_name += '.' + test.im_class.__name__
except AttributeError:
  pass
```

Подробнее [на stackoverflow](http://stackoverflow.com/questions/610883/how-to-know-if-an-object-has-an-attribute-in-python/610923#610923).