diff options
-rw-r--r-- | CHANGES.txt | 3 | ||||
-rw-r--r-- | coverage/control.py | 3 | ||||
-rw-r--r-- | coverage/plugin_support.py | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index f28bab23..b23ab343 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,6 +24,9 @@ Latest persisted in pursuing this despite Ned's pessimism. Fixes `issue 308`_ and `issue 324`_. +- The COVERAGE_DEBUG environment variable can be used to set the `[run]debug` + configuration option to control what internal operations are logged. + - HTML reports were truncated at formfeed characters. This is now fixed (`issue 360`_). It's always fun when the problem is due to a `bug in the Python standard library <http://bugs.python.org/issue19035>`_. diff --git a/coverage/control.py b/coverage/control.py index b982c792..9ac091d7 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -139,6 +139,9 @@ class Coverage(object): env_data_file = os.environ.get('COVERAGE_FILE') if env_data_file: self.config.data_file = env_data_file + debugs = os.environ.get('COVERAGE_DEBUG') + if debugs: + self.config.debug.extend(debugs.split(",")) # 4: from constructor arguments: self.config.from_args( diff --git a/coverage/plugin_support.py b/coverage/plugin_support.py index 8bdc7213..74a0d73d 100644 --- a/coverage/plugin_support.py +++ b/coverage/plugin_support.py @@ -119,12 +119,12 @@ class DebugFileTracerWrapper(FileTracer): def dynamic_source_filename(self, filename, frame): dyn = self.tracer.dynamic_source_filename(filename, frame) - self.debug.write("dynamic_source_filename(%r, frame) --> %r" % (filename, dyn)) + self.debug.write("dynamic_source_filename(%r) --> %r" % (filename, dyn)) return dyn def line_number_range(self, frame): pair = self.tracer.line_number_range(frame) - self.debug.write("line_number_range(frame) --> %r" % (pair,)) + self.debug.write("line_number_range() --> %r" % (pair,)) return pair |