From 9b5d80869c664228b6dd9e8971c269854879f71f Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Fri, 2 Dec 2005 20:39:19 -0800 Subject: [PATCH] [project @ robey@ralph.lag.net-20051203043919-0a8c4665d04853fc] turn down output for unit tests by default, but add --verbose option to manually crank them back up --- test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test.py b/test.py index 97188a4..e75e8ef 100755 --- a/test.py +++ b/test.py @@ -42,6 +42,8 @@ default_keyfile = os.path.join(os.environ.get('HOME', '/'), '.ssh/id_rsa') default_passwd = None parser = OptionParser('usage: %prog [options]') +parser.add_option('--verbose', action='store_true', dest='verbose', default=False, + help='verbose display (one line per test)') parser.add_option('--no-pkey', action='store_false', dest='use_pkey', default=True, help='skip RSA/DSS private key tests (which can take a while)') parser.add_option('--no-transport', action='store_false', dest='use_transport', default=True, @@ -93,4 +95,7 @@ if options.use_transport: suite.addTest(unittest.makeSuite(TransportTest)) if options.use_sftp: suite.addTest(unittest.makeSuite(SFTPTest)) -unittest.TextTestRunner(verbosity=2).run(suite) +verbosity = 1 +if options.verbose: + verbosity = 2 +unittest.TextTestRunner(verbosity=verbosity).run(suite)