From 4ef91bd9fc954c7182480440e5ce9346073b9270 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 5 Aug 2021 10:59:39 -0700 Subject: feat: HTML report now says where the report is. #1195 (#1207) --- tests/test_cmdline.py | 2 +- tests/test_plugins.py | 3 ++- tests/test_process.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index b214473c..caaa43c8 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -55,7 +55,7 @@ class BaseCmdLineTest(CoverageTest): _defaults.Coverage( cover_pylib=None, data_suffix=None, timid=None, branch=None, config_file=True, source=None, include=None, omit=None, debug=None, - concurrency=None, check_preimported=True, context=None, + concurrency=None, check_preimported=True, context=None, messages=True, ) DEFAULT_KWARGS = {name: kw for name, _, kw in _defaults.mock_calls} diff --git a/tests/test_plugins.py b/tests/test_plugins.py index ca0e6dac..18c08507 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -6,6 +6,7 @@ import inspect import io import os.path +import re from xml.etree import ElementTree import pytest @@ -256,7 +257,7 @@ class PluginTest(CoverageTest): out = self.run_command("coverage run main_file.py") assert out == "MAIN\n" out = self.run_command("coverage html") - assert out == "" + assert re.fullmatch(r"Wrote HTML report to htmlcov[/\\]index.html\n", out) @pytest.mark.skipif(env.C_TRACER, reason="This test is only about PyTracer.") diff --git a/tests/test_process.py b/tests/test_process.py index 58915b87..5510efe5 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -1298,7 +1298,7 @@ class UnicodeFilePathsTest(CoverageTest): # The HTML report uses ascii-encoded HTML entities. out = self.run_command("coverage html") - assert out == "" + assert re.fullmatch(r"Wrote HTML report to htmlcov[/\\]index.html\n", out) self.assert_exists("htmlcov/h\xe2t_py.html") with open("htmlcov/index.html") as indexf: index = indexf.read() @@ -1331,7 +1331,7 @@ class UnicodeFilePathsTest(CoverageTest): # The HTML report uses ascii-encoded HTML entities. out = self.run_command("coverage html") - assert out == "" + assert re.fullmatch(r"Wrote HTML report to htmlcov[/\\]index.html\n", out) self.assert_exists("htmlcov/d_5786906b6f0ffeb4_accented_py.html") with open("htmlcov/index.html") as indexf: index = indexf.read() -- cgit v1.2.1