summaryrefslogtreecommitdiff
path: root/coverage/html.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-04-21 21:31:58 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-04-21 21:31:58 -0400
commit2a7a4f2161d26eeb898f3deec3f7ce21b0f2f957 (patch)
tree6ae60d1198cc845a239a9635acc5ecd6a5af744d /coverage/html.py
parent71e2e22f6d7601218f08ed038689fe8abc871d17 (diff)
downloadpython-coveragepy-2a7a4f2161d26eeb898f3deec3f7ce21b0f2f957.tar.gz
More work on #299
Add the timestamp to the Python output files also. Move the timestamp to the footer. Add Conrad to AUTHORS, and update the CHANGES file.
Diffstat (limited to 'coverage/html.py')
-rw-r--r--coverage/html.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/coverage/html.py b/coverage/html.py
index 2748d64..0b2cc25 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -93,6 +93,7 @@ class HtmlReporter(Reporter):
self.status = HtmlStatus()
self.extra_css = None
self.totals = Numbers()
+ self.time_stamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M')
def report(self, morfs):
"""Generate an HTML report for `morfs`.
@@ -238,6 +239,7 @@ class HtmlReporter(Reporter):
'c_exc': c_exc, 'c_mis': c_mis, 'c_par': c_par, 'c_run': c_run,
'arcs': self.arcs, 'extra_css': self.extra_css,
'fr': fr, 'nums': nums, 'lines': lines,
+ 'time_stamp': self.time_stamp,
}
html = spaceless(self.source_tmpl.render(template_values))
@@ -262,14 +264,12 @@ class HtmlReporter(Reporter):
self.totals = sum(f['nums'] for f in self.files)
- time_stamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M')
-
html = index_tmpl.render({
'arcs': self.arcs,
'extra_css': self.extra_css,
'files': self.files,
'totals': self.totals,
- 'time_stamp': time_stamp,
+ 'time_stamp': self.time_stamp,
})
self.write_html(