# HG changeset patch # User Augie Fackler # Date 2014-11-13 20:47:15 # Node ID dadcd40b62d8e9d0d6616af1c15b7eaa540fe4c3 # Parent 9dd0d0d61a24319dd45993970ccd9bd6710abeb9 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. diff --git a/tests/silenttestrunner.py b/tests/silenttestrunner.py --- a/tests/silenttestrunner.py +++ b/tests/silenttestrunner.py @@ -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 @@ def main(modulename): print sys.stdout.write(exc) sys.exit(1) + +if os.environ.get('SILENT_BE_NOISY'): + main = unittest.main