0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-16 06:51:46 +01:00

Define a (class) decorator for easily setting a DEBUG logging level on a TestCase

This commit is contained in:
Paul "LeoNerd" Evans 2014-09-12 18:38:11 +01:00
parent ca8349a897
commit 33c4dd4c2d

View file

@ -49,3 +49,8 @@ class TestCase(unittest.TestCase):
logging.getLogger().setLevel(level) logging.getLogger().setLevel(level)
return orig_setUp() return orig_setUp()
self.setUp = setUp self.setUp = setUp
def DEBUG(target):
target.loglevel = logging.DEBUG
return target