summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-04-04 07:08:41 -0400
committerNed Batchelder <ned@nedbatchelder.com>2017-04-04 07:08:41 -0400
commita0d7920455a7844fecd97180256c9d6242fb5a14 (patch)
tree1a84f8e2c315015d5519c2e5d7e3058930265588 /coverage/control.py
parent2f01ede8dd7eeb8f59db533921afd6ff56ff6acb (diff)
downloadpython-coveragepy-a0d7920455a7844fecd97180256c9d6242fb5a14.tar.gz
Warnings can be disabled
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/coverage/control.py b/coverage/control.py
index b67ed90..aeca9f7 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -608,6 +608,10 @@ class Coverage(object):
For warning suppression, use `slug` as the shorthand.
"""
+ if slug in self.config.disable_warnings:
+ # Don't issue the warning
+ return
+
self._warnings.append(msg)
if slug:
msg = "%s (%s)" % (msg, slug)