mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-07 22:41:57 +00: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):
|
class TestCase(unittest.TestCase):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, methodName, *args, **kwargs):
|
||||||
super(TestCase, self).__init__(*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
|
orig_setUp = self.setUp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user