run-tests: give unittest wrapper a short description
This will make the output contain something useful rather than the
default repr() for the class.
--- a/tests/run-tests.py Sun Apr 20 11:22:08 2014 -0700
+++ b/tests/run-tests.py Sun Apr 20 11:24:37 2014 -0700
@@ -1251,12 +1251,18 @@
if not asunit:
return t
- # If we want a unittest compatible object, we wrap our Test.
class MercurialTest(unittest.TestCase):
+ def __init__(self, name, *args, **kwargs):
+ super(MercurialTest, self).__init__(*args, **kwargs)
+ self.name = name
+
+ def shortDescription(self):
+ return self.name
+
def runTest(self):
t.run()
- return MercurialTest()
+ return MercurialTest(test)
def _cleanup(self):
"""Clean up state from this test invocation."""