diff options
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/coverage/control.py b/coverage/control.py index 889ef55c..3a0b0107 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -224,8 +224,8 @@ class Coverage(object): self._inited_for_start = False # Have we started collecting and not stopped it? self._started = False - # Have we written --debug output? - self._wrote_debug = False + # Should we write the debug output? + self._should_write_debug = True # If we have sub-process measurement happening automatically, then we # want any explicit creation of a Coverage object to mean, this process @@ -277,8 +277,8 @@ class Coverage(object): def _post_init(self): """Stuff to do after everything is initialized.""" - if not self._wrote_debug: - self._wrote_debug = True + if self._should_write_debug: + self._should_write_debug = False self._write_startup_debug() # '[run] _crash' will raise an exception if the value is close by in @@ -481,6 +481,9 @@ class Coverage(object): self._inorout.plugins = self._plugins self._inorout.disp_class = self._collector.file_disposition_class + # It's useful to write debug info after initing for start. + self._should_write_debug = True + atexit.register(self._atexit) def _init_data(self, suffix): |