From a28e873891003ad31762e1214d32f54ec423fd62 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 25 Nov 2019 15:43:44 -0500 Subject: Adapt to 3.9's way of reporting files using absolute paths. --- coverage/files.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'coverage/files.py') diff --git a/coverage/files.py b/coverage/files.py index dc8c248f..2836d4e5 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -172,6 +172,13 @@ def abs_file(filename): return path +def python_reported_file(filename): + """Return the string as Python would describe this file name.""" + if env.PYBEHAVIOR.report_absolute_files: + filename = os.path.abspath(filename) + return filename + + RELATIVE_DIR = None CANONICAL_FILENAME_CACHE = None set_relative_directory() -- cgit v1.2.1