mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04: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
@ -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 New Issue
Block a user