summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-12-09 21:35:59 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-12-09 21:35:59 -0500
commitc2b8a4aac5c0953ab868ffa7b3904b43b8e9fe8b (patch)
tree1d586d8a91caa613b3203cca4a15df6f38c5f14b /coverage/control.py
parent6992a50c1e14ef01db9c89b0917e1b2d29a5a802 (diff)
downloadpython-coveragepy-c2b8a4aac5c0953ab868ffa7b3904b43b8e9fe8b.tar.gz
Hmm, is this a good way to keep the meta-coverage quiet?
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 309343b..115d26c 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -181,6 +181,7 @@ class coverage(object):
# Is it ok for no data to be collected?
self._warn_no_data = True
+ self._warn_unimported_source = True
self._started = False
atexit.register(self._atexit)
@@ -481,8 +482,9 @@ class coverage(object):
# If there are still entries in the source_pkgs list, then we never
# encountered those packages.
- for pkg in self.source_pkgs:
- self._warn("Module %s was never imported." % pkg)
+ if self._warn_unimported_source:
+ for pkg in self.source_pkgs:
+ self._warn("Module %s was never imported." % pkg)
# Find out if we got any data.
summary = self.data.summary()
@@ -706,6 +708,7 @@ def process_startup():
cov = coverage(config_file=cps, auto_data=True)
cov.start()
cov._warn_no_data = False
+ cov._warn_unimported_source = False
# A hack for debugging testing in subprocesses.