diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2017-03-03 22:28:47 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-03-03 22:28:47 -0500 |
commit | 04099ca4f3585eae83de43ca7a2da96625234029 (patch) | |
tree | 41ff4c5ff47697b1085837180c9e22b1d9e66eab /coverage/control.py | |
parent | 0dfb8c8275918b8a31c75ab9e8f45828b9698036 (diff) | |
download | python-coveragepy-04099ca4f3585eae83de43ca7a2da96625234029.tar.gz |
Collecting continues after saving data. #79 #448
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/coverage/control.py b/coverage/control.py index a9b4b9e..a12eb2e 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -177,8 +177,6 @@ class Coverage(object): self._inited = False # Have we started collecting and not stopped it? self._started = False - # Have we measured some data and not harvested it? - self._measured = False # If we have sub-process measurement happening automatically, then we # want any explicit creation of a Coverage object to mean, this process @@ -671,7 +669,6 @@ class Coverage(object): self.collector.start() self._started = True - self._measured = True def stop(self): """Stop measuring code coverage.""" @@ -789,7 +786,7 @@ class Coverage(object): ) def get_data(self): - """Get the collected data and reset the collector. + """Get the collected data. Also warn about various problems collecting data. @@ -799,7 +796,8 @@ class Coverage(object): """ self._init() - if not self._measured: + + if not self.collector.activity(): return self.data self.collector.save_data(self.data) @@ -837,7 +835,6 @@ class Coverage(object): if self.config.note: self.data.add_run_info(note=self.config.note) - self._measured = False return self.data def _find_unexecuted_files(self, src_dir): |