From 60bd8a04f79de261da24161f79de51ac8fcb8e26 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 24 Dec 2015 12:07:40 +0100 Subject: [PATCH] Improve help, and copy it to the README. --- README.md | 24 ++++++++++++++++++++++++ irctest/__main__.py | 5 +++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f1790a..0aaf856 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,30 @@ make install python3 -m irctest irctest.controllers.charybdis ``` +## Full help + +``` +usage: python3 -m irctest [-h] [--show-io] [-v] [-s SPECIFICATION] [-l] module + +positional arguments: + module The module used to run the tested program. + +optional arguments: + -h, --help show this help message and exit + --show-io Show input/outputs with the tested program. + -v, --verbose Verbosity. Give this option multiple times to make it + even more verbose. + -s SPECIFICATION, --specification SPECIFICATION + The set of specifications to test the program with. + Valid values: RFC1459, RFC2812, IRCv3.1, IRCv3.2. Use + this option multiple times to test with multiple + specifications. If it is not given, defaults to all. + -l, --loose Disables strict checks of conformity to the + specification. Strict means the specification is + unclear, and the most restrictive interpretation is + choosen. +``` + ## What `irctest` is not A formal proof that a given software follows any of the IRC specification, diff --git a/irctest/__main__.py b/irctest/__main__.py index b14e1f4..a517fbd 100644 --- a/irctest/__main__.py +++ b/irctest/__main__.py @@ -62,13 +62,14 @@ parser.add_argument('module', type=str, 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.') + help='Verbosity. Give this option multiple times to make ' + 'it even more verbose.') parser.add_argument('-s', '--specification', type=str, action='append', help=('The set of specifications to test the program with. ' 'Valid values: {}. ' 'Use this option multiple times to test with multiple ' 'specifications. If it is not given, defaults to all.') - .format(list(map(str, Specifications)))) + .format(', '.join(x.value for x in Specifications))) parser.add_argument('-l', '--loose', action='store_true', help='Disables strict checks of conformity to the specification. ' 'Strict means the specification is unclear, and the most restrictive '