From 33c4dd4c2ddcd81854855e84a838db9603bbe338 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Fri, 12 Sep 2014 18:38:11 +0100 Subject: [PATCH] Define a (class) decorator for easily setting a DEBUG logging level on a TestCase --- tests/unittest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unittest.py b/tests/unittest.py index 19be03b96a..c66a3b8407 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -49,3 +49,8 @@ class TestCase(unittest.TestCase): logging.getLogger().setLevel(level) return orig_setUp() self.setUp = setUp + + +def DEBUG(target): + target.loglevel = logging.DEBUG + return target