From e6f703c7b5f3d9c3ac6e8d0dde74f2d40c1def40 Mon Sep 17 00:00:00 2001 From: John Chilton <jmchilton@gmail.com> Date: Sun, 1 Sep 2013 16:47:19 -0500 Subject: [PATCH] Suppress extraneous output for passing tests. --- test/check.py | 7 +++++-- test/integration_test.py | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/check.py b/test/check.py index 87612d03..14198073 100644 --- a/test/check.py +++ b/test/check.py @@ -75,7 +75,8 @@ finally: try: client.download_output(temp_output_path + "x", temp_directory) except BaseException as e: - traceback.print_exc(e) + if not options.suppress_output: + traceback.print_exc(e) output_file = open(temp_output_path, 'r') try: output_contents = output_file.read() @@ -87,7 +88,8 @@ finally: #client.download_work_dir_output("workdir_output") #assert os.path.exists("workdir_output") except BaseException as e: - traceback.print_exc(e) + if not options.suppress_output: + traceback.print_exc(e) raise e finally: shutil.rmtree(temp_directory) @@ -102,6 +104,7 @@ def main(): parser.add_option('--transport', default=None) # set to curl to use pycurl parser.add_option('--cache', default=False, action="store_true") parser.add_option('--test_errors', default=False, action="store_true") + parser.add_option('--suppress_output', default=False, action="store_true") (options, args) = parser.parse_args() run(options) diff --git a/test/integration_test.py b/test/integration_test.py index 57a531ea..f31ae6d4 100644 --- a/test/integration_test.py +++ b/test/integration_test.py @@ -22,7 +22,10 @@ class IntegrationTest(TestCase): self.__run(app_conf={"private_key": "testtoken"}, private_token="testtoken", transport="curl", cache=False, test_errors=True) def __run(self, app_conf={}, **kwds): + kwds["suppress_output"] = True from .test_utils import test_server with test_server(app_conf=app_conf) as server: options = Bunch(url=server.application_url, **kwds) + print "Running" run(options) + print "DoneRunning" -- GitLab