From 2c79b6e7fbd98039a2e731dbd2c326435924c19c Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 20 Dec 2015 20:39:06 +0100 Subject: [PATCH] Add command-line option for verbosity. --- irctest/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/irctest/__main__.py b/irctest/__main__.py index c394637..8438a9b 100644 --- a/irctest/__main__.py +++ b/irctest/__main__.py @@ -29,7 +29,7 @@ def main(args): _IrcTestCase.controllerClass = controller_class _IrcTestCase.show_io = args.show_io ts = module.discover() - testRunner = OptionalityReportingTextTestRunner() + testRunner = OptionalityReportingTextTestRunner(verbosity=args.verbose) testLoader = unittest.loader.defaultTestLoader testRunner.run(ts) @@ -40,6 +40,8 @@ parser.add_argument('module', type=str, help='The module used to run the tested program.') parser.add_argument('--show-io', action='store_true', help='Show input/outputs with the tested program.') +parser.add_argument('-v', '--verbose', action='count', default=1, + help='Verbosity.') args = parser.parse_args()