diff options
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/disposition.py | 2 | ||||
-rw-r--r-- | coverage/inorout.py | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/coverage/disposition.py b/coverage/disposition.py index dfcc6def..1c39a9c1 100644 --- a/coverage/disposition.py +++ b/coverage/disposition.py @@ -30,6 +30,8 @@ def disposition_debug_msg(disp): """Make a nice debug message of what the FileDisposition is doing.""" if disp.trace: msg = f"Tracing {disp.original_filename!r}" + if disp.original_filename != disp.source_filename: + msg += f" as {disp.source_filename!r}" if disp.file_tracer: msg += ": will be traced by %r" % disp.file_tracer else: diff --git a/coverage/inorout.py b/coverage/inorout.py index 6bdac06e..3bc7e54e 100644 --- a/coverage/inorout.py +++ b/coverage/inorout.py @@ -317,6 +317,9 @@ class InOrOut: disp.reason = reason return disp + if original_filename.startswith('<'): + return nope(disp, "not a real original file name") + if frame is not None: # Compiled Python files have two file names: frame.f_code.co_filename is # the file name at the time the .pyc was compiled. The second name is |