Mercurial > hg
changeset 21427:60f944758ad4
run-tests: give unittest wrapper a short description
This will make the output contain something useful rather than the
default repr() for the class.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 20 Apr 2014 11:24:37 -0700 |
parents | 791bdd65acd3 |
children | 3df2ecf8d545 |
files | tests/run-tests.py |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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."""