turn down output for unit tests by default, but add --verbose option to manually crank them back up
This commit is contained in:
Robey Pointer 2005-12-02 20:39:19 -08:00
parent a6b4875286
commit 9b5d80869c
1 changed files with 6 additions and 1 deletions

View File

@ -42,6 +42,8 @@ default_keyfile = os.path.join(os.environ.get('HOME', '/'), '.ssh/id_rsa')
default_passwd = None default_passwd = None
parser = OptionParser('usage: %prog [options]') 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, 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)') 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, 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)) suite.addTest(unittest.makeSuite(TransportTest))
if options.use_sftp: if options.use_sftp:
suite.addTest(unittest.makeSuite(SFTPTest)) suite.addTest(unittest.makeSuite(SFTPTest))
unittest.TextTestRunner(verbosity=2).run(suite) verbosity = 1
if options.verbose:
verbosity = 2
unittest.TextTestRunner(verbosity=verbosity).run(suite)