diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-04-24 00:05:41 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-04-24 00:05:41 -0400 |
commit | 654f9d49752940d4768d2aabe03bc11963f275d2 (patch) | |
tree | 33c0eb967ddb585a0da90dd2ddec634c26efbbdb /coverage/htmlfiles | |
parent | 6055e1fdad3a483b76333fd63583f431fe664e5f (diff) | |
download | python-coveragepy-654f9d49752940d4768d2aabe03bc11963f275d2.tar.gz |
HTML and CSS for html reporting are now in separate files.
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r-- | coverage/htmlfiles/pyfile.html | 51 | ||||
-rw-r--r-- | coverage/htmlfiles/style.css | 105 |
2 files changed, 156 insertions, 0 deletions
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html new file mode 100644 index 0000000..1a30d89 --- /dev/null +++ b/coverage/htmlfiles/pyfile.html @@ -0,0 +1,51 @@ +<!doctype html PUBLIC "-//W3C//DTD html 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Coverage for {{cu.name|escape}}</title>
+<link rel='stylesheet' href='style.css' type='text/css'>
+</head>
+<body>
+<div id='header'>
+ <div class='content'>
+ <div id='file_stats'>
+ <table class='stats'>
+ <tr><td class='label'>Lines</td><td class='number'>{{n_lin}}</td></tr>
+ <tr><td class='label'>Statements</td><td class='number'>{{n_stm}}</td></tr>
+ <tr><td class='label'>Excluded</td><td class='number'>{{n_exc}}</td></tr>
+ <tr><td class='label'>Missing</td><td class='number'>{{n_mis}}</td></tr>
+ </table>
+ </div>
+ <p>Coverage for <b>{{cu.filename|escape}}</b>:
+ <span class='pc_cov'>{{pc_cov|format_pct}}%</span>
+ </p>
+ <div style='clear:both'></div>
+ </div>
+</div>
+
+<div id='source'>
+<table cellspacing='0' cellpadding='0'>
+<tr>
+<td class='linenos' valign='top'>
+ {% for line in lines %}
+ <p class='{{line.class}}'>{{line.number}}</p>
+ {% endfor %}
+</td>
+<td class='text' valign='top'>
+ {% for line in lines %}
+ <p class='{{line.class}}'>{{line.text.rstrip|escape|not_empty}}</p>
+ {% endfor %}
+</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/style.css b/coverage/htmlfiles/style.css new file mode 100644 index 0000000..1fb9b6b --- /dev/null +++ b/coverage/htmlfiles/style.css @@ -0,0 +1,105 @@ +/* CSS styles for coverage.py */ +/* Page-wide styles */ +html, body, p, td { + margin: 0; + padding: 0; + } + +/* Set baseline grid to 14 pt. */ +body { + font-size: .875em; /* 14/16 */ + } + +html>body { + font-size: 14px; + } + +/* Set base font size to 12/14 */ +p { + font-size: .85714em; /* 12/14 */ + line-height: 1.16667em; /* 14/12 */ + } + +a.nav { + text-decoration: none; + color: inherit; + } +a.nav:hover { + text-decoration: underline; + color: inherit; + } + +/* Page structure */ +#header { + background: #ffd472; + width: 100%; + font-family: verdana, sans-serif; + } + +#source { + padding: 1em; + font-family: "courier new", monospace; + } + +#footer { + background: #ffe9b8; + font-size: 85%; + font-family: verdana, sans-serif; + color: #666666; + font-style: italic; + } + +/* Header styles */ +.content { + padding: 1em; + } + +#file_stats { + float: right; + } + +.stats .number { + text-align: right; + font-weight: bold; + } + +/* Source file styles */ +.linenos { + background: #eeeeee; + } +.linenos p { + text-align: right; + margin: 0; + padding: 0 .5em; + color: #999999; + font-size: .75em; /* 9/12 */ + line-height: 1.3333em; /* 12/9, why isn't it 14/9? */ + } +td.text { + width: 100%; + } +.text p { + margin: 0; + padding: 0 0 0 .5em; + white-space: nowrap; + } + +.linenos p.mis { + background: #ffcccc; + } +.linenos p.run { + background: #ccffcc; + } +.linenos p.exc { + background: #e2e2e2; + } + +.text p.mis { + background: #ffdddd; + } +.text p.run { + background: #ddffdd; + } +.text p.exc { + background: #eeeeee; + } |