diff options
author | loic@dachary.org <loic@dachary.org> | 2016-12-18 17:24:37 +0100 |
---|---|---|
committer | loic@dachary.org <loic@dachary.org> | 2016-12-18 17:24:37 +0100 |
commit | c863b83d505397c1af74c152f4f3900c80877073 (patch) | |
tree | d0f864a3772618a9753bf5316d4a7792e8035c4c /tests/test_html.py | |
parent | 878363970556406d1eed322f6bd8747af1145462 (diff) | |
download | python-coveragepy-git-c863b83d505397c1af74c152f4f3900c80877073.tar.gz |
implement --skip-covered for html report #433
close #433
--HG--
branch : issue-433-2
Diffstat (limited to 'tests/test_html.py')
-rw-r--r-- | tests/test_html.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_html.py b/tests/test_html.py index b1f813ed..b9813624 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -447,6 +447,24 @@ class HtmlTest(HtmlTestHelpers, CoverageTest): self.run_coverage() self.assert_exists("htmlcov/status.dat") + def test_report_skip_covered_no_branches(self): + self.make_file("main.py", """ + import not_covered + + def normal(): + print("z") + normal() + """) + self.make_file("not_covered.py", """ + def not_covered(): + print("n") + """) + self.run_command("coverage run main.py") + self.run_command("coverage html --skip-covered") + self.assert_exists("htmlcov/index.html") + self.assert_doesnt_exist("htmlcov/main_py.html") + self.assert_exists("htmlcov/not_covered_py.html") + class HtmlStaticFileTest(CoverageTest): """Tests of the static file copying for the HTML report.""" |