summaryrefslogtreecommitdiff
path: root/coverage/htmlfiles
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-04-25 23:54:16 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-04-25 23:54:16 -0400
commitcf2886166f3265712f7ff3170126da3ba1e00654 (patch)
treeba4c4f04afa0ccc47c606f2c3481ccf0cc4fd02f /coverage/htmlfiles
parent86983f76487ff246ef62daf5d02920568c0d69d2 (diff)
downloadpython-coveragepy-git-cf2886166f3265712f7ff3170126da3ba1e00654.tar.gz
HTML report now has an index.html.
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r--coverage/htmlfiles/index.html54
-rw-r--r--coverage/htmlfiles/pyfile.html8
-rw-r--r--coverage/htmlfiles/style.css48
3 files changed, 99 insertions, 11 deletions
diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html
new file mode 100644
index 00000000..b6715c14
--- /dev/null
+++ b/coverage/htmlfiles/index.html
@@ -0,0 +1,54 @@
+<!doctype html PUBLIC "-//W3C//DTD html 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Coverage report</title>
+<link rel='stylesheet' href='style.css' type='text/css'>
+</head>
+<body>
+
+<div id='header'>
+ <div class='content'>
+ <h1>Coverage report:
+ <span class='pc_cov'>{{total_cov|format_pct}}%</span>
+ </h1>
+ </div>
+</div>
+
+<div id='index'>
+<table class='index'>
+<tr>
+ <th class='name'>Module</th>
+ <th>statements</th>
+ <th>run</th>
+ <th>excluded</th>
+ <th>coverage</th>
+</tr>
+{% for file in files %}
+<tr>
+ <td class='name'><a href='{{file.html_filename}}'>{{file.cu.name}}</a></td>
+ <td>{{file.stm}}</td>
+ <td>{{file.run}}</td>
+ <td>{{file.exc}}</td>
+ <td>{{file.pc_cov|format_pct}}%</td>
+</tr>
+{% endfor %}
+<tr class='total'>
+<td class='name'>Total</td>
+<td>{{total_stm}}</td>
+<td>{{total_run}}</td>
+<td>{{total_exc}}</td>
+<td>{{total_cov|format_pct}}%</td>
+</tr>
+</table>
+</div>
+
+<div id='footer'>
+ <div class='content'>
+ <p>
+ <a class='nav' href='http://bitbucket.org/ned/coveragepy/'>coverage.py v{{__version__}}</a>
+ </p>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html
index d4c15c6a..afcb4a5e 100644
--- a/coverage/htmlfiles/pyfile.html
+++ b/coverage/htmlfiles/pyfile.html
@@ -50,13 +50,5 @@ function toggle_lines(btn, cls) {
</table>
</div>
-<div id='footer'>
- <div class='content'>
- <p>
- <a class='nav' href='http://bitbucket.org/ned/coveragepy/'>coverage.py v{{__version__}}</a>
- </p>
- </div>
-</div>
-
</body>
</html>
diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css
index 1a08b78e..5290bbd3 100644
--- a/coverage/htmlfiles/style.css
+++ b/coverage/htmlfiles/style.css
@@ -1,6 +1,6 @@
/* CSS styles for coverage.py */
/* Page-wide styles */
-html, body, h1, h2, h3, p, td {
+html, body, h1, h2, h3, p, td, th {
margin: 0;
padding: 0;
border: 0;
@@ -14,6 +14,7 @@ html, body, h1, h2, h3, p, td {
/* Set baseline grid to 16 pt. */
body {
+ font-family: georgia, serif;
font-size: 1em;
}
@@ -27,6 +28,10 @@ p {
line-height: 1.3333em; /* 16/12 */
}
+table {
+ border-collapse: collapse;
+ }
+
a.nav {
text-decoration: none;
color: inherit;
@@ -40,7 +45,6 @@ a.nav:hover {
#header {
background: #f8f8f8;
width: 100%;
- font-family: georgia, serif;
border-bottom: 1px solid #eee;
}
@@ -56,9 +60,13 @@ a.nav:hover {
font-style: italic;
}
+#index {
+ margin: 1em 0 0 3em;
+ }
+
/* Header styles */
.content {
- padding: 1em 3em .5em 3em;
+ padding: 1em 3em;
}
h1 {
@@ -115,3 +123,37 @@ td.text {
.text p.hide {
background: inherit;
}
+
+/* index styles */
+#index td, #index th {
+ text-align: right;
+ width: 6em;
+ padding: .25em 0;
+ border-bottom: 1px solid #eee;
+ }
+#index th {
+ font-style: italic;
+ color: #333;
+ border-bottom: 1px solid #ccc;
+ }
+#index td.name, #index th.name {
+ text-align: left;
+ width: auto;
+ height: 1.5em;
+ }
+#index td.name a {
+ text-decoration: none;
+ color: #000;
+ }
+#index td.name a:hover {
+ text-decoration: underline;
+ color: #000;
+ }
+#index tr.total {
+ font-weight: bold;
+ }
+#index tr.total td {
+ padding: .25em 0;
+ border-top: 1px solid #ccc;
+ border-bottom: none;
+ }