From 0d82f5f090da94e4eafc83cb4cfacc2d90fc5e74 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 4 Apr 2017 07:08:41 -0400 Subject: Warnings can be disabled --- coverage/control.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'coverage/control.py') diff --git a/coverage/control.py b/coverage/control.py index b67ed904..aeca9f71 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) -- cgit v1.2.1