summaryrefslogtreecommitdiff
path: root/coverage/html.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-04-20 19:25:17 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-04-20 19:25:17 -0400
commite049a9849e1d492650c3cbb25669292bd8130a60 (patch)
tree1377d4cc5126923e463f97ed9abb550d2ba1dbf2 /coverage/html.py
parentfb133d4b8881bd8368db54039c1dc3d243c83095 (diff)
downloadpython-coveragepy-git-e049a9849e1d492650c3cbb25669292bd8130a60.tar.gz
Adjust the colors; make the fonts the same so I don't have to struggle with CSS right now; prevent wrapping so long lines won't ruin the lineup of the numbers.
Diffstat (limited to 'coverage/html.py')
-rw-r--r--coverage/html.py46
1 files changed, 22 insertions, 24 deletions
diff --git a/coverage/html.py b/coverage/html.py
index f0a94474..f7e86049 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -28,18 +28,18 @@ class HtmlReporter(Reporter):
css_class = ""
if lineno in statements:
- css_class += " s"
+ css_class += " stm"
if lineno not in missing and lineno not in excluded:
- css_class += " r"
+ css_class += " run"
if lineno in excluded:
- css_class += " x"
+ css_class += " exc"
if lineno in missing:
- css_class += " m"
+ css_class += " mis"
lineinfo = {
'text': line,
'number': lineno,
- 'class': css_class.strip() or "p"
+ 'class': css_class.strip() or "pln"
}
lines.append(lineinfo)
@@ -49,7 +49,6 @@ class HtmlReporter(Reporter):
fhtml.close()
-
# Helpers for templates
def escape(t):
@@ -68,47 +67,46 @@ def not_empty(t):
# Templates
SOURCE = """\
+<!doctype html PUBLIC "-//W3C//DTD html 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Coverage of {{cu.filename|escape}}</title>
<style>
-* {
- font-size: 11pt;
- line-height: 1.1em;
- }
.linenos {
background: #eee;
}
.linenos p {
text-align: right;
margin: 0;
- padding: 0 .5em 0 0;
- font-family: verdana, sans-serif;
+ padding: 0 .5em 0 .5em;
+ font-family: "courier new", monospace;
+ color: #999;
}
.source p {
margin: 0;
padding: 0 0 0 .5em;
font-family: "courier new", monospace;
+ white-space: nowrap;
}
-.linenos p.m {
- background: #fcc;
+.linenos p.mis {
+ background: #ffcccc;
}
-.linenos p.r {
- background: #cfc;
+.linenos p.run {
+ background: #ccffcc;
}
-.linenos p.x {
- background: #ddd;
+.linenos p.exc {
+ background: #e2e2e2;
}
-.source p.m {
- background: #fee;
+.source p.mis {
+ background: #ffdddd;
}
-.source p.r {
- background: #efe;
+.source p.run {
+ background: #ddffdd;
}
-.source p.x {
- background: #eee;
+.source p.exc {
+ background: #eeeeee;
}
</style>
</head>