PATCH: Fix qmtest summarize --help output
Mark Mitchell
mark at codesourcery.com
Sun Sep 28 21:16:41 UTC 2003
This patch makes QMTest automatically generate the list of format
options generated by qmtest summarize --help. (At present, the "batch"
format was omitted from the help output.)
--
Mark Mitchell <mark at codesourcery.com>
CodeSourcery, LLC
-------------- next part --------------
2003-09-28 Mark Mitchell <mark at codesourcery.com>
* qm/test/cmdline.py (QMTest.summary_formats): Rearrange order.
(QMTest.commands_spec): Automatically generate lists of --format
options.
* qm/test/classes/text_result_stream.py
(TextResultStream.arguments): Specify valid enumerals for format.
Index: qm/test/cmdline.py
===================================================================
RCS file: /home/sc/Repository/qm/qm/test/cmdline.py,v
retrieving revision 1.100
diff -c -5 -p -r1.100 cmdline.py
*** qm/test/cmdline.py 28 Sep 2003 18:24:27 -0000 1.100
--- qm/test/cmdline.py 28 Sep 2003 21:04:06 -0000
*************** class QMTest:
*** 94,104 ****
"""A string listing the available extension kinds."""
db_path_environment_variable = "QMTEST_DB_PATH"
"""The environment variable specifying the test database path."""
! summary_formats = ("full", "brief", "stats", "batch", "none")
"""Valid formats for result summaries."""
context_file_name = "context"
"""The default name of a context file."""
--- 94,104 ----
"""A string listing the available extension kinds."""
db_path_environment_variable = "QMTEST_DB_PATH"
"""The environment variable specifying the test database path."""
! summary_formats = ("brief", "full", "stats", "batch", "none")
"""Valid formats for result summaries."""
context_file_name = "context"
"""The default name of a context file."""
*************** suite IDs to run; omit arguments to run
*** 431,443 ****
Test results are written to "results.qmr". Use the '--output' option to
specify a different output file, or '--no-output' to supress results.
Use the '--format' option to specify the output format for the summary.
! Valid formats are "full", "brief" (the default), "stats", and "none".
! The summary is written to standard output.
! """,
(
concurrent_option_spec,
context_file_spec,
context_option_spec,
format_option_spec,
--- 431,442 ----
Test results are written to "results.qmr". Use the '--output' option to
specify a different output file, or '--no-output' to supress results.
Use the '--format' option to specify the output format for the summary.
! Valid formats are %s.
! """ % _make_comma_separated_string(summary_formats, "and"),
(
concurrent_option_spec,
context_file_spec,
context_option_spec,
format_option_spec,
*************** Loads a test results file and summarizes
*** 461,472 ****
to the results file. Optionally, specify one or more test or suite IDs
whose results are shown. If none are specified, shows all tests that
did not pass.
Use the '--format' option to specify the output format for the summary.
! Valid formats are "full", "brief" (the default), "stats", and "none".
! """,
( help_option_spec,
format_option_spec,
outcomes_option_spec,
result_stream_spec)
),
--- 460,471 ----
to the results file. Optionally, specify one or more test or suite IDs
whose results are shown. If none are specified, shows all tests that
did not pass.
Use the '--format' option to specify the output format for the summary.
! Valid formats are %s.
! """ % _make_comma_separated_string(summary_formats, "and"),
( help_option_spec,
format_option_spec,
outcomes_option_spec,
result_stream_spec)
),
Index: qm/test/classes/text_result_stream.py
===================================================================
RCS file: /home/sc/Repository/qm/qm/test/classes/text_result_stream.py,v
retrieving revision 1.4
diff -c -5 -p -r1.4 text_result_stream.py
*** qm/test/classes/text_result_stream.py 12 Aug 2003 20:14:18 -0000 1.4
--- qm/test/classes/text_result_stream.py 28 Sep 2003 21:04:06 -0000
*************** class TextResultStream(FileResultStream)
*** 80,90 ****
The "full" format is like "brief" except that all
annotations are shown for tests as they are run.
In the "stats" format only the summary statistics are
! displayed."""),
]
def __init__(self, arguments):
"""Construct a 'TextResultStream'.
--- 80,91 ----
The "full" format is like "brief" except that all
annotations are shown for tests as they are run.
In the "stats" format only the summary statistics are
! displayed.""",
! enumerals = ["brief", "batch", "full", "stats"])
]
def __init__(self, arguments):
"""Construct a 'TextResultStream'.
More information about the qmtest
mailing list