[Checkins] SVN: zc.zservertracelog/trunk/src/zc/zservertracelog/t Fix column width to avoid spurious test failures when tests are run in
Jim Fulton
jim at zope.com
Thu Apr 8 10:22:15 EDT 2010
Log message for revision 110636:
Fix column width to avoid spurious test failures when tests are run in
terminals of unusual widths.
Normalize some output to account from formating changes in optparse help.
Changed:
U zc.zservertracelog/trunk/src/zc/zservertracelog/tests.py
U zc.zservertracelog/trunk/src/zc/zservertracelog/tracereport.txt
-=-
Modified: zc.zservertracelog/trunk/src/zc/zservertracelog/tests.py
===================================================================
--- zc.zservertracelog/trunk/src/zc/zservertracelog/tests.py 2010-04-08 13:44:12 UTC (rev 110635)
+++ zc.zservertracelog/trunk/src/zc/zservertracelog/tests.py 2010-04-08 14:22:15 UTC (rev 110636)
@@ -28,6 +28,8 @@
# normalize the channel id and iso8601 timestamp
(re.compile(r'-?\d+ \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{6}'),
'23418928 2008-08-26 10:55:00.000000'),
+ (re.compile(r'^usage: '), 'Usage: '),
+ (re.compile(r'options:'), 'Options:'),
])
_null_app = lambda environ, start_response: None
Modified: zc.zservertracelog/trunk/src/zc/zservertracelog/tracereport.txt
===================================================================
--- zc.zservertracelog/trunk/src/zc/zservertracelog/tracereport.txt 2010-04-08 13:44:12 UTC (rev 110635)
+++ zc.zservertracelog/trunk/src/zc/zservertracelog/tracereport.txt 2010-04-08 14:22:15 UTC (rev 110636)
@@ -5,6 +5,8 @@
`tracereport.py` provides a basic means to analyze a tracelog and generate a
report.
+ >>> import os
+ >>> os.environ['COLUMNS'] = '70'
>>> import zc.zservertracelog.tracereport
The '--help' option displays the following usage information:
@@ -13,7 +15,7 @@
... zc.zservertracelog.tracereport.main(['--help'])
... except SystemExit:
... pass
- usage: test [options] trace_log_file
+ Usage: test [options] trace_log_file
<BLANKLINE>
Output trace log data showing:
<BLANKLINE>
@@ -38,22 +40,23 @@
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
- options:
+ Options:
-h, --help show this help message and exit
-a APPS, --app-request-threshold=APPS
- Number of pending application requests at which
- detailed request information if printed.
+ Number of pending application requests at
+ which detailed request information if
+ printed.
-r APP_REQUESTS, --app-requests=APP_REQUESTS
- How many requests to show when the maximum number of
- pending apps is exceeded.
+ How many requests to show when the maximum
+ number of pending apps is exceeded.
-o OLD_REQUESTS, --old-requests=OLD_REQUESTS
Number of seconds beyond which a request is
considered old.
-e EVENT_LOG, --event-log=EVENT_LOG
- The name of an event log that goes with the trace
- log. This is used to determine when the server is
- restarted, so that the running trace data structures
- can be reinitialized.
+ The name of an event log that goes with the
+ trace log. This is used to determine when
+ the server is restarted, so that the running
+ trace data structures can be reinitialized.
--html Generate HTML output.
--remove-prefix=REMOVE_PREFIX
A prefex to be removed from URLS.
@@ -61,6 +64,7 @@
--summary-lines=SUMMARY_LINES
The number of summary lines to show
+
Here, we display the summarized report for a sample trace log.
>>> zc.zservertracelog.tracereport.main(
More information about the checkins
mailing list