run-tests: implement Test.__str__
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 22 Apr 2014 13:37:27 -0700
changeset 21463 c908ff887589
parent 21462 8a4ef661f08d
child 21464 d19164a018a1
run-tests: implement Test.__str__ unittest sometimes does a str(test) and the default implementation doesn't do the right thing. So we override it.
tests/run-tests.py
--- a/tests/run-tests.py	Mon Apr 21 12:15:55 2014 -0700
+++ b/tests/run-tests.py	Tue Apr 22 13:37:27 2014 -0700
@@ -387,6 +387,9 @@
             # will try again.
             shutil.rmtree(self._threadtmp, True)
 
+    def __str__(self):
+        return self.name
+
     def setUp(self):
         """Tasks to perform before run()."""
         self._finished = False