From d679d5442ea8d39111e02b8d3251e34418287e50 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 3 Mar 2017 22:28:47 -0500 Subject: Collecting continues after saving data. #79 #448 --- coverage/control.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'coverage/control.py') diff --git a/coverage/control.py b/coverage/control.py index a9b4b9ef..a12eb2ee 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): -- cgit v1.2.1