summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.rst7
-rw-r--r--CONTRIBUTORS.txt1
-rw-r--r--coverage/report.py8
3 files changed, 9 insertions, 7 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index ec31b21b..5f89576f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -20,11 +20,18 @@ 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. Finishes `issue 1523`_ thanks to `Ricardo Newbery
+ <pull 1613_>`_.
+
- Docs: a new :ref:`Migrating page <migrating>` 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_>`_.
+.. _issue 1523: https://github.com/nedbat/coveragepy/issues/1523
.. _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 f5f2898f..b02f7add 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 1e14eb78..09eed0a8 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: