summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-03-03 22:28:47 -0500
committerNed Batchelder <ned@nedbatchelder.com>2017-03-03 22:28:47 -0500
commitd679d5442ea8d39111e02b8d3251e34418287e50 (patch)
tree5f05ecc5a5d8a07063845f5797d02324a61eee6c /coverage/control.py
parentc2b922448ac753630c3170eb2a5bd3a00016aa79 (diff)
downloadpython-coveragepy-git-d679d5442ea8d39111e02b8d3251e34418287e50.tar.gz
Collecting continues after saving data. #79 #448
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py9
1 files changed, 3 insertions, 6 deletions
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):