diff options
| author | Conrad Ho <devnull@localhost> | 2015-04-14 03:54:05 +0800 |
|---|---|---|
| committer | Conrad Ho <devnull@localhost> | 2015-04-14 03:54:05 +0800 |
| commit | 61a07dc55be8b5c4028ebafe2e603335349358e2 (patch) | |
| tree | 8e39e487de5caa0e9e8cc2fd1e0b1fbdcbd519a6 /coverage | |
| parent | e036d40450fd3a30a71a81f63054597bbfd0f168 (diff) | |
| download | python-coveragepy-61a07dc55be8b5c4028ebafe2e603335349358e2.tar.gz | |
Ticket299: add time stamp to index.html reports page
Diffstat (limited to 'coverage')
| -rw-r--r-- | coverage/html.py | 4 | ||||
| -rw-r--r-- | coverage/htmlfiles/index.html | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/coverage/html.py b/coverage/html.py index 2a9e0d1..92ca3f1 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals +import datetime import json import os import re @@ -261,11 +262,14 @@ 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, }) self.write_html( diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html index 90802c8..7f3ab3e 100644 --- a/coverage/htmlfiles/index.html +++ b/coverage/htmlfiles/index.html @@ -23,6 +23,7 @@ <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' /> |
