mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
Additionally look first for a 'loglevel' attribute on the running test method, before the TestCase
This commit is contained in:
parent
33c4dd4c2d
commit
d9f3f322c5
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue