diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-11-24 20:30:53 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-11-24 20:30:53 -0500 |
commit | b0a0f00a433d7c3467d07ce7cea4cfbaaa6ae49e (patch) | |
tree | 34c48b1b92baf9ae9e64282ec38e793e2c61423d /coverage/pytracer.py | |
parent | 4354d6ee80c81d390052c15092c7c51f2318f2f6 (diff) | |
download | python-coveragepy-git-b0a0f00a433d7c3467d07ce7cea4cfbaaa6ae49e.tar.gz |
Change how dynamic source filenames work in plugins.
Diffstat (limited to 'coverage/pytracer.py')
-rw-r--r-- | coverage/pytracer.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/coverage/pytracer.py b/coverage/pytracer.py index 84071bb1..b4fd59fa 100644 --- a/coverage/pytracer.py +++ b/coverage/pytracer.py @@ -28,6 +28,7 @@ class PyTracer(object): self.arcs = False self.should_trace = None self.should_trace_cache = None + self.check_include = None self.warn = None self.plugin_data = None # The threading module to use, if any. @@ -83,13 +84,11 @@ class PyTracer(object): self.cur_file_dict = None if disp.trace: tracename = disp.source_filename - if disp.file_tracer: - dyn_func = disp.file_tracer.dynamic_source_file_name() - if dyn_func: - tracename = dyn_func(tracename, frame) - if tracename: - if not self.check_include(tracename): - tracename = None + if disp.file_tracer and disp.has_dynamic_filename: + tracename = disp.file_tracer.dynamic_source_filename(tracename, frame) + if tracename: + if not self.check_include(tracename): + tracename = None else: tracename = None if tracename: |