Skip to content

Commit

Permalink
docs: sample HTML report for 6.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Oct 31, 2021
1 parent 7957d0a commit ff59658
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 45 deletions.
38 changes: 23 additions & 15 deletions doc/sample_html/coverage_html.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,21 @@ coverage.pyfile_ready = function () {
coverage.set_sel(0);
}

document.querySelector(".button_toggle_run").addEventListener("click", coverage.toggle_lines);
document.querySelector(".button_toggle_mis").addEventListener("click", coverage.toggle_lines);
document.querySelector(".button_toggle_exc").addEventListener("click", coverage.toggle_lines);
document.querySelector(".button_toggle_par").addEventListener("click", coverage.toggle_lines);
const on_click = function(sel, fn) {
const elt = document.querySelector(sel);
if (elt) {
elt.addEventListener("click", fn);
}
}
on_click(".button_toggle_run", coverage.toggle_lines);
on_click(".button_toggle_mis", coverage.toggle_lines);
on_click(".button_toggle_exc", coverage.toggle_lines);
on_click(".button_toggle_par", coverage.toggle_lines);

document.querySelector(".button_next_chunk").addEventListener("click", coverage.to_next_chunk_nicely);
document.querySelector(".button_prev_chunk").addEventListener("click", coverage.to_prev_chunk_nicely);
document.querySelector(".button_top_of_page").addEventListener("click", coverage.to_top);
document.querySelector(".button_first_chunk").addEventListener("click", coverage.to_first_chunk);
on_click(".button_next_chunk", coverage.to_next_chunk_nicely);
on_click(".button_prev_chunk", coverage.to_prev_chunk_nicely);
on_click(".button_top_of_page", coverage.to_top);
on_click(".button_first_chunk", coverage.to_first_chunk);

coverage.filters = undefined;
try {
Expand Down Expand Up @@ -258,13 +264,15 @@ coverage.toggle_lines = function (event) {
coverage.set_line_visibilty = function (category, should_show) {
const cls = "show_" + category;
const btn = document.querySelector(".button_toggle_" + category);
if (should_show) {
document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls));
btn.classList.add(cls);
}
else {
document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls));
btn.classList.remove(cls);
if (btn) {
if (should_show) {
document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls));
btn.classList.add(cls);
}
else {
document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls));
btn.classList.remove(cls);
}
}
};

Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80___init___py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -71,8 +72,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80___main___py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -67,8 +68,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80_backward_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -104,8 +105,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80_cogapp_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -872,8 +873,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80_makefiles_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -108,8 +109,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80_test_cogapp_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -2540,8 +2541,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80_test_makefiles_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -184,8 +185,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80_test_whiteutils_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -163,8 +164,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
7 changes: 4 additions & 3 deletions doc/sample_html/d_7b071bdc2a35fa80_whiteutils_py.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ <h1>
<kbd>r</kbd>
<kbd>m</kbd>
<kbd>x</kbd>
<kbd>p</kbd> &nbsp; toggle line displays
<kbd>p</kbd>
&nbsp; toggle line displays
</p>
<p class="keyhelp">
<kbd>j</kbd>
Expand Down Expand Up @@ -135,8 +136,8 @@ <h2>
<footer>
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
4 changes: 2 additions & 2 deletions doc/sample_html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ <h1>Coverage report:
<footer>
<div class="content">
<p>
<a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1</a>,
created at 2021-10-29 22:41 -0400
<a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.1.1</a>,
created at 2021-10-31 09:41 -0400
</p>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/sample_html/status.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"format":2,"version":"6.1","globals":"e385eb185350a8ab0cefee795b10cb84","files":{"d_7b071bdc2a35fa80___init___py":{"hash":"1fc4f9498f460d6c93280e8962ee0c0f","index":{"nums":[2,1,2,0,0,0,0,0],"html_filename":"d_7b071bdc2a35fa80___init___py.html","relative_filename":"cogapp/__init__.py"}},"d_7b071bdc2a35fa80___main___py":{"hash":"ffe6befa655d4d0b0b31eb0c73811311","index":{"nums":[2,1,3,0,3,0,0,0],"html_filename":"d_7b071bdc2a35fa80___main___py.html","relative_filename":"cogapp/__main__.py"}},"d_7b071bdc2a35fa80_backward_py":{"hash":"32afb71b2a11dd4b8ca4ed66b6815d42","index":{"nums":[2,1,22,0,6,4,2,2],"html_filename":"d_7b071bdc2a35fa80_backward_py.html","relative_filename":"cogapp/backward.py"}},"d_7b071bdc2a35fa80_cogapp_py":{"hash":"f3523a775c5c1d12a213eead8df82291","index":{"nums":[2,1,486,1,215,200,28,132],"html_filename":"d_7b071bdc2a35fa80_cogapp_py.html","relative_filename":"cogapp/cogapp.py"}},"d_7b071bdc2a35fa80_makefiles_py":{"hash":"85ec1064ff86d94238a8d7b76a2178a5","index":{"nums":[2,1,27,0,20,14,0,14],"html_filename":"d_7b071bdc2a35fa80_makefiles_py.html","relative_filename":"cogapp/makefiles.py"}},"d_7b071bdc2a35fa80_test_cogapp_py":{"hash":"6985a05ab5a9b347b3665136686f6fb1","index":{"nums":[2,1,788,8,547,20,0,18],"html_filename":"d_7b071bdc2a35fa80_test_cogapp_py.html","relative_filename":"cogapp/test_cogapp.py"}},"d_7b071bdc2a35fa80_test_makefiles_py":{"hash":"647f7dc911c97a6e646a91c3300a25ff","index":{"nums":[2,1,71,0,53,6,0,6],"html_filename":"d_7b071bdc2a35fa80_test_makefiles_py.html","relative_filename":"cogapp/test_makefiles.py"}},"d_7b071bdc2a35fa80_test_whiteutils_py":{"hash":"9476b26e42e6169b1857cfe7f29bf954","index":{"nums":[2,1,69,0,50,0,0,0],"html_filename":"d_7b071bdc2a35fa80_test_whiteutils_py.html","relative_filename":"cogapp/test_whiteutils.py"}},"d_7b071bdc2a35fa80_whiteutils_py":{"hash":"cf00c3e6149e4b80a2d01b6919c066a4","index":{"nums":[2,1,45,0,5,34,4,4],"html_filename":"d_7b071bdc2a35fa80_whiteutils_py.html","relative_filename":"cogapp/whiteutils.py"}}}}
{"format":2,"version":"6.1.1","globals":"39f446cd732e316017c8c9fa061ccf97","files":{"d_7b071bdc2a35fa80___init___py":{"hash":"1fc4f9498f460d6c93280e8962ee0c0f","index":{"nums":[2,1,2,0,0,0,0,0],"html_filename":"d_7b071bdc2a35fa80___init___py.html","relative_filename":"cogapp/__init__.py"}},"d_7b071bdc2a35fa80___main___py":{"hash":"ffe6befa655d4d0b0b31eb0c73811311","index":{"nums":[2,1,3,0,3,0,0,0],"html_filename":"d_7b071bdc2a35fa80___main___py.html","relative_filename":"cogapp/__main__.py"}},"d_7b071bdc2a35fa80_backward_py":{"hash":"32afb71b2a11dd4b8ca4ed66b6815d42","index":{"nums":[2,1,22,0,6,4,2,2],"html_filename":"d_7b071bdc2a35fa80_backward_py.html","relative_filename":"cogapp/backward.py"}},"d_7b071bdc2a35fa80_cogapp_py":{"hash":"f3523a775c5c1d12a213eead8df82291","index":{"nums":[2,1,486,1,215,200,28,132],"html_filename":"d_7b071bdc2a35fa80_cogapp_py.html","relative_filename":"cogapp/cogapp.py"}},"d_7b071bdc2a35fa80_makefiles_py":{"hash":"85ec1064ff86d94238a8d7b76a2178a5","index":{"nums":[2,1,27,0,20,14,0,14],"html_filename":"d_7b071bdc2a35fa80_makefiles_py.html","relative_filename":"cogapp/makefiles.py"}},"d_7b071bdc2a35fa80_test_cogapp_py":{"hash":"6985a05ab5a9b347b3665136686f6fb1","index":{"nums":[2,1,788,8,547,20,0,18],"html_filename":"d_7b071bdc2a35fa80_test_cogapp_py.html","relative_filename":"cogapp/test_cogapp.py"}},"d_7b071bdc2a35fa80_test_makefiles_py":{"hash":"647f7dc911c97a6e646a91c3300a25ff","index":{"nums":[2,1,71,0,53,6,0,6],"html_filename":"d_7b071bdc2a35fa80_test_makefiles_py.html","relative_filename":"cogapp/test_makefiles.py"}},"d_7b071bdc2a35fa80_test_whiteutils_py":{"hash":"9476b26e42e6169b1857cfe7f29bf954","index":{"nums":[2,1,69,0,50,0,0,0],"html_filename":"d_7b071bdc2a35fa80_test_whiteutils_py.html","relative_filename":"cogapp/test_whiteutils.py"}},"d_7b071bdc2a35fa80_whiteutils_py":{"hash":"cf00c3e6149e4b80a2d01b6919c066a4","index":{"nums":[2,1,45,0,5,34,4,4],"html_filename":"d_7b071bdc2a35fa80_whiteutils_py.html","relative_filename":"cogapp/whiteutils.py"}}}}

0 comments on commit ff59658

Please sign in to comment.