Mercurial > hg
changeset 23308:dadcd40b62d8
silenttestrunner: add environment variable to make tests noisy again
As I've been working on complicated extension code it's been handy to
be able to get standard unittest verbose output so I can find crashers
more efficiently.
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 13 Nov 2014 15:47:15 -0500 |
parents | 9dd0d0d61a24 |
children | 7eb520f5efe4 |
files | tests/silenttestrunner.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/silenttestrunner.py Fri Nov 14 05:58:59 2014 -0800 +++ b/tests/silenttestrunner.py Thu Nov 13 15:47:15 2014 -0500 @@ -1,4 +1,4 @@ -import unittest, sys +import unittest, sys, os def main(modulename): '''run the tests found in module, printing nothing when all tests pass''' @@ -16,3 +16,6 @@ print sys.stdout.write(exc) sys.exit(1) + +if os.environ.get('SILENT_BE_NOISY'): + main = unittest.main