diff options
| -rw-r--r-- | CHANGES.txt | 4 | ||||
| -rw-r--r-- | coverage/control.py | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index f3b2e45c..b88b2ebc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,8 +6,8 @@ Change history for Coverage.py ----- - Added the ``--debug`` switch to ``coverage run``. It accepts one option now, - ``notrace``, to log decisions not to trace files. I'm hoping this will help - people diagnose why their code isn't being traced. + ``trace``, to log decisions whether to trace files. I'm hoping this will + help people diagnose why their code isn't being traced. - Improved the branch coverage facility, fixing `issue 90`_ and `issue 175`_. diff --git a/coverage/control.py b/coverage/control.py index fa85be68..a767a264 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -41,7 +41,7 @@ class coverage(object): """ def __init__(self, data_file=None, data_suffix=None, cover_pylib=None, auto_data=False, timid=None, branch=None, config_file=True, - source=None, omit=None, include=None, debug=()): + source=None, omit=None, include=None, debug=None): """ `data_file` is the base name of the data file to use, defaulting to ".coverage". `data_suffix` is appended (with a dot) to `data_file` to @@ -287,9 +287,12 @@ class coverage(object): """ canonical, reason = self._should_trace_with_reason(filename, frame) - if not canonical: - if 'notrace' in self.config.debug: - sys.stderr.write("Not tracing %r: %s\n" % (filename, reason)) + if 'trace' in self.config.debug: + if not canonical: + msg = "Not tracing %r: %s\n" % (filename, reason) + else: + msg = "Tracing %r\n" % (filename,) + sys.stderr.write(msg) return canonical def _warn(self, msg): |
