File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 88
99"""
1010
11- import contextlib
1211import datetime
1312import glob
1413import inspect
2221import sys
2322import sysconfig
2423import textwrap
25- import time
2624import types
2725import zipfile
2826
4745# by "python igor.py blah".
4846
4947
50- @contextlib .contextmanager
51- def time_message (msg : str ):
52- """Print a message about how long something took."""
53- start = time .monotonic ()
54- try :
55- yield
56- finally :
57- print (f"Time for { msg } : { time .monotonic () - start :.2f} s" )
58-
59-
6048def do_show_env ():
6149 """Show the environment variables."""
6250 print ("Environment:" )
@@ -243,8 +231,7 @@ def do_combine_html():
243231 os .environ ["COVERAGE_HOME" ] = os .getcwd ()
244232 cov = coverage .Coverage (config_file = "metacov.ini" )
245233 cov .load ()
246- with time_message ("combine" ):
247- cov .combine ()
234+ cov .combine ()
248235 cov .save ()
249236 # A new Coverage to turn on messages. Better would be to have tighter
250237 # control over message verbosity...
@@ -253,8 +240,7 @@ def do_combine_html():
253240 show_contexts = bool (
254241 os .getenv ("COVERAGE_DYNCTX" ) or os .getenv ("COVERAGE_CONTEXT" ),
255242 )
256- with time_message ("html" ):
257- total = cov .html_report (show_contexts = show_contexts )
243+ total = cov .html_report (show_contexts = show_contexts )
258244 print (f"Total: { total :.3f} %" )
259245
260246
You can’t perform that action at this time.
0 commit comments