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 8
8
9
9
"""
10
10
11
- import contextlib
12
11
import datetime
13
12
import glob
14
13
import inspect
22
21
import sys
23
22
import sysconfig
24
23
import textwrap
25
- import time
26
24
import types
27
25
import zipfile
28
26
47
45
# by "python igor.py blah".
48
46
49
47
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
-
60
48
def do_show_env ():
61
49
"""Show the environment variables."""
62
50
print ("Environment:" )
@@ -243,8 +231,7 @@ def do_combine_html():
243
231
os .environ ["COVERAGE_HOME" ] = os .getcwd ()
244
232
cov = coverage .Coverage (config_file = "metacov.ini" )
245
233
cov .load ()
246
- with time_message ("combine" ):
247
- cov .combine ()
234
+ cov .combine ()
248
235
cov .save ()
249
236
# A new Coverage to turn on messages. Better would be to have tighter
250
237
# control over message verbosity...
@@ -253,8 +240,7 @@ def do_combine_html():
253
240
show_contexts = bool (
254
241
os .getenv ("COVERAGE_DYNCTX" ) or os .getenv ("COVERAGE_CONTEXT" ),
255
242
)
256
- with time_message ("html" ):
257
- total = cov .html_report (show_contexts = show_contexts )
243
+ total = cov .html_report (show_contexts = show_contexts )
258
244
print (f"Total: { total :.3f} %" )
259
245
260
246
You can’t perform that action at this time.
0 commit comments