summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/unittest.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unittest.py b/tests/unittest.py
index c66a3b8407..8ae724c786 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -27,10 +27,14 @@ logging.getLogger().setLevel(NEVER)
 
 
 class TestCase(unittest.TestCase):
-    def __init__(self, *args, **kwargs):
-        super(TestCase, self).__init__(*args, **kwargs)
+    def __init__(self, methodName, *args, **kwargs):
+        super(TestCase, self).__init__(methodName, *args, **kwargs)
 
-        level = getattr(self, "loglevel", NEVER)
+        method = getattr(self, methodName)
+
+        level = getattr(method, "loglevel",
+                    getattr(self, "loglevel",
+                        NEVER))
 
         orig_setUp = self.setUp