summaryrefslogtreecommitdiff
path: root/coverage
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
commitbd08ffa8a50d8175b607d268c9857ef92e0d231d (patch)
tree88faeaff7f5d6f17f0832a10dcdea16add287bfb /coverage
parentb976d22f5c6f9d42cbaf3bff5e3dd3faa0987838 (diff)
downloadpython-coveragepy-git-bd08ffa8a50d8175b607d268c9857ef92e0d231d.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')
-rw-r--r--coverage/html.py6
-rw-r--r--coverage/htmlfiles/index.html4
-rw-r--r--coverage/htmlfiles/pyfile.html3
3 files changed, 7 insertions, 6 deletions
diff --git a/coverage/html.py b/coverage/html.py
index 2748d647..0b2cc25c 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(
diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html
index b872d056..1afc57c9 100644
--- a/coverage/htmlfiles/index.html
+++ b/coverage/htmlfiles/index.html
@@ -23,7 +23,6 @@
<h1>{{ title|escape }}:
<span class="pc_cov">{{totals.pc_covered_str}}%</span>
</h1>
- <p>Created on {{ time_stamp }}</p>
<img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" />
@@ -106,7 +105,8 @@
<div id="footer">
<div class="content">
<p>
- <a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>
+ <a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>,
+ created at {{ time_stamp }}
</p>
</div>
</div>
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html
index 72b69288..d78ba536 100644
--- a/coverage/htmlfiles/pyfile.html
+++ b/coverage/htmlfiles/pyfile.html
@@ -84,7 +84,8 @@
<div id="footer">
<div class="content">
<p>
- <a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>
+ <a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>,
+ created at {{ time_stamp }}
</p>
</div>
</div>