From 3569f921992e10036281d469f22cf4a2e06a6c45 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 13 Oct 2018 10:17:10 -0400 Subject: Fewer conditionals for debug output --- coverage/debug.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'coverage/debug.py') diff --git a/coverage/debug.py b/coverage/debug.py index ce22d725..2c5c6aaf 100644 --- a/coverage/debug.py +++ b/coverage/debug.py @@ -91,6 +91,12 @@ class DebugControlString(DebugControl): return self.raw_output.getvalue() +class NoDebugging(object): + """A replacement for DebugControl that will never try to do anything.""" + def should(self, option): + return False + + def info_header(label): """Make a nice header string.""" return "--{0:-<60s}".format(" "+label+" ") -- cgit v1.2.1