def id(self): orig = super(TagsHack, self).id() tags = os.getenv('TAGS', '') if not tags: return orig else: fn = self._get_test_method() attributes = getattr(fn, '__testtools_attrs', None) tags = tags.split(" ") if attributes: for tag in tags: if tag in attributes: return orig # A hack to please testtools to get uniq testcase names return get_unique_random_name()