summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-23 11:00:53 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-23 11:00:53 -0400
commite3ff72a32401f97b4e3f8e627780c87366d62414 (patch)
tree9b965e865b7f3da28933dae40bd73a7b539a39c4 /test
parent0b96d1ba8b0fb03628a57e255b39243c66751038 (diff)
downloadpython-coveragepy-git-e3ff72a32401f97b4e3f8e627780c87366d62414.tar.gz
Syntax coloring in the HTML reports.
Diffstat (limited to 'test')
-rw-r--r--test/farm/html/gold_a/a.html16
-rw-r--r--test/farm/html/gold_a/index.html2
-rw-r--r--test/farm/html/run_a.py4
-rw-r--r--test/farm/html/run_tabbed.py6
4 files changed, 16 insertions, 12 deletions
diff --git a/test/farm/html/gold_a/a.html b/test/farm/html/gold_a/a.html
index 6cc0b908..b29831b6 100644
--- a/test/farm/html/gold_a/a.html
+++ b/test/farm/html/gold_a/a.html
@@ -21,7 +21,7 @@ function toggle_lines(btn, cls) {
<body>
<div id='header'>
<div class='content'>
- <h1>Coverage for <b>c:\ned\coverage\trunk\test\farm\html\src\a.py</b>:
+ <h1>Coverage for <b>a</b> :
<span class='pc_cov'>67%</span>
</h1>
<h2 class='stats'>
@@ -47,13 +47,13 @@ function toggle_lines(btn, cls) {
</td>
<td class='text' valign='top'>
-<p class='pln'># A test file for HTML reporting by coverage.</p>
-<p class='pln'>&nbsp;</p>
-<p class='stm run hide'>if 1 &lt; 2:</p>
-<p class='pln'>&nbsp; &nbsp; # Needed a &lt; to look at HTML entities.</p>
-<p class='stm run hide'>&nbsp; &nbsp; a = 3</p>
-<p class='pln'>else:</p>
-<p class='stm mis'>&nbsp; &nbsp; a = 4</p>
+<p class='pln'><span class='com'># A test file for HTML reporting by coverage.</span><span class="strut">&nbsp;</span></p>
+<p class='pln'><span class="strut">&nbsp;</span></p>
+<p class='stm run hide'><span class='key'>if</span> <span class='num'>1</span> <span class='op'>&lt;</span> <span class='num'>2</span><span class='op'>:</span><span class="strut">&nbsp;</span></p>
+<p class='pln'>&nbsp; &nbsp; <span class='com'># Needed a &lt; to look at HTML entities.</span><span class="strut">&nbsp;</span></p>
+<p class='stm run hide'>&nbsp; &nbsp; <span class='nam'>a</span> <span class='op'>=</span> <span class='num'>3</span><span class="strut">&nbsp;</span></p>
+<p class='pln'><span class='key'>else</span><span class='op'>:</span><span class="strut">&nbsp;</span></p>
+<p class='stm mis'>&nbsp; &nbsp; <span class='nam'>a</span> <span class='op'>=</span> <span class='num'>4</span><span class="strut">&nbsp;</span></p>
</td>
</tr>
diff --git a/test/farm/html/gold_a/index.html b/test/farm/html/gold_a/index.html
index 18b8af5b..c8a0ecc7 100644
--- a/test/farm/html/gold_a/index.html
+++ b/test/farm/html/gold_a/index.html
@@ -45,7 +45,7 @@
<div id='footer'>
<div class='content'>
<p>
- <a class='nav' href='http://bitbucket.org/ned/coveragepy/'>coverage.py v3.0b2</a>
+ <a class='nav' href='http://nedbatchelder.com/code/coverage'>coverage v3.1b1</a>
</p>
</div>
</div>
diff --git a/test/farm/html/run_a.py b/test/farm/html/run_a.py
index ab0da42e..4a8a0514 100644
--- a/test/farm/html/run_a.py
+++ b/test/farm/html/run_a.py
@@ -13,8 +13,8 @@ runfunc(html_it, rundir="src")
# and check that certain key strings are in the output.
compare("html", "gold_a", size_within=10)
contains("html/a.html",
- ">if 1 &lt; 2:<",
- "&nbsp; &nbsp; a = 3",
+ "<span class='key'>if</span> <span class='num'>1</span> <span class='op'>&lt;</span> <span class='num'>2</span>",
+ "&nbsp; &nbsp; <span class='nam'>a</span> <span class='op'>=</span> <span class='num'>3</span>",
"<span class='pc_cov'>67%</span>"
)
contains("html/index.html",
diff --git a/test/farm/html/run_tabbed.py b/test/farm/html/run_tabbed.py
index c49bdfbd..88ffcaef 100644
--- a/test/farm/html/run_tabbed.py
+++ b/test/farm/html/run_tabbed.py
@@ -13,6 +13,10 @@ runfunc(html_it, rundir="src")
contains("src/tabbed.py", "\tif x:\t\t\t\t\t\t# look nice")
contains("html/tabbed.html",
- "<p class='stm run hide'>&nbsp; &nbsp; if x:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; # look nice</p>")
+ ">&nbsp; &nbsp; <span class='key'>if</span> <span class='nam'>x</span>"
+ "<span class='op'>:</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"
+ " &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class='com'># look nice</span>"
+ )
+
doesnt_contain("html/tabbed.html", "\t")
clean("html")