diff --git a/CHANGES.rst b/CHANGES.rst index ec31b21b6..4f42a372c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,11 +20,16 @@ development at the same time, such as 4.5.x and 5.0. Unreleased ---------- +- When the HTML report location is printed to the terminal, it's now a + terminal-compatible URL, so that you can click the location to open the HTML + file in your browser. Thanks, `Ricardo Newbery `_. + - Docs: a new :ref:`Migrating page ` with details about how to migrate between major versions of coverage.py. It currently covers the wildcard changes in 7.x. Thanks, `Brian Grohe `_. .. _pull 1610: https://github.com/nedbat/coveragepy/pull/1610 +.. _pull 1613: https://github.com/nedbat/coveragepy/pull/1613 .. scriv-start-here diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index f5f2898fd..b02f7add9 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -147,6 +147,7 @@ Peter Ebden Peter Portante Phebe Polk Reya B +Ricardo Newbery Rodrigue Cloutier Roger Hu Ross Lawley diff --git a/coverage/report.py b/coverage/report.py index 1e14eb78e..09eed0a82 100644 --- a/coverage/report.py +++ b/coverage/report.py @@ -5,7 +5,6 @@ from __future__ import annotations -import os import sys from typing import Callable, Iterable, Iterator, IO, Optional, Tuple, TYPE_CHECKING @@ -59,12 +58,7 @@ def render_report( try: ret = reporter.report(morfs, outfile=outfile) if file_to_close is not None: - if sys.stdout.isatty(): - file_path = f"file://{os.path.abspath(output_path)}" - print_path = f"\033]8;;{file_path}\a{output_path}\033]8;;\a" - else: - print_path = output_path - msgfn(f"Wrote {reporter.report_type} to {print_path}") + msgfn(f"Wrote {reporter.report_type} to {output_path}") delete_file = False return ret finally: