diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-06-10 09:01:00 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-06-10 09:01:00 -0400 |
commit | 17b6fe064c3e93df5561fa181e191f37ea7f0bbf (patch) | |
tree | c6abee7e299cb656d991fc062e71179277e23832 /test/farm/html/run_tabbed.py | |
parent | 6d79cab810cac3e7350c9dcbafbf51453b63efba (diff) | |
download | python-coveragepy-git-17b6fe064c3e93df5561fa181e191f37ea7f0bbf.tar.gz |
Expand tabs to spaces before creating HTML output. Fixes bug #6.
Diffstat (limited to 'test/farm/html/run_tabbed.py')
-rw-r--r-- | test/farm/html/run_tabbed.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/farm/html/run_tabbed.py b/test/farm/html/run_tabbed.py new file mode 100644 index 00000000..c49bdfbd --- /dev/null +++ b/test/farm/html/run_tabbed.py @@ -0,0 +1,18 @@ +def html_it(): + """Run coverage and make an HTML report for tabbed.""" + import coverage + cov = coverage.coverage() + cov.start() + import tabbed + cov.stop() + cov.html_report(tabbed, directory="../html") + +runfunc(html_it, rundir="src") + +# Editors like to change things, make sure our source file still has tabs. +contains("src/tabbed.py", "\tif x:\t\t\t\t\t\t# look nice") + +contains("html/tabbed.html", + "<p class='stm run hide'> if x: # look nice</p>") +doesnt_contain("html/tabbed.html", "\t") +clean("html") |