Submitter | Augie Fackler |
---|---|
Date | Nov. 14, 2014, 3:44 p.m. |
Message ID | <787ccc893f1fe3fce36d.1415979869@arthedain.pit.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/6733/ |
State | Accepted |
Commit | dadcd40b62d8e9d0d6616af1c15b7eaa540fe4c3 |
Headers | show |
Comments
On 11/14/2014 03:44 PM, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1415911635 18000 > # Thu Nov 13 15:47:15 2014 -0500 > # Node ID 787ccc893f1fe3fce36debddaa12d3223fa9efc5 > # Parent 394c79df66c39923477528b2ea2092b6944b965b > 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. This change does not looks harmful, but I've no idea what it is supposed to actually achieved.
On 11/14/2014 03:44 PM, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1415911635 18000 > # Thu Nov 13 15:47:15 2014 -0500 > # Node ID 787ccc893f1fe3fce36debddaa12d3223fa9efc5 > # Parent 394c79df66c39923477528b2ea2092b6944b965b > 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. This change does not looks harmful, but I've no idea what it is supposed to actually achieves
On Fri, Nov 14, 2014 at 12:49 PM, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote: >> # HG changeset patch >> # User Augie Fackler <augie@google.com> >> # Date 1415911635 18000 >> # Thu Nov 13 15:47:15 2014 -0500 >> # Node ID 787ccc893f1fe3fce36debddaa12d3223fa9efc5 >> # Parent 394c79df66c39923477528b2ea2092b6944b965b >> 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. > > > > This change does not looks harmful, but I've no idea what it is supposed to > actually achieves Basically, it re-enables the normal unittest output, including -v. It's dang helpful when you're testing a C extension that segfaults somewhere.
On Fri, 2014-11-14 at 10:44 -0500, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1415911635 18000 > # Thu Nov 13 15:47:15 2014 -0500 > # Node ID 787ccc893f1fe3fce36debddaa12d3223fa9efc5 > # Parent 394c79df66c39923477528b2ea2092b6944b965b > silenttestrunner: add environment variable to make tests noisy again Queued for default, thanks.
Patch
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