# HG changeset patch # User Gregory Szorc # Date 1398018277 25200 # Node ID 60f944758ad415f608afb21e471b9dd28190002c # Parent 791bdd65acd31218cf30aee8e9074c565f333041 run-tests: give unittest wrapper a short description This will make the output contain something useful rather than the default repr() for the class. diff -r 791bdd65acd3 -r 60f944758ad4 tests/run-tests.py --- 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."""